Starting from:
$14.99

$8.99

Homework #2 Solution

2.1  Create the following x and y vectors:

x= 1,2,3

y= 11,12,13,14,15,16

2.2   Calculate and display z=x+y.

2.3   Explain the results.

2.4   Create a vector of your last name.

2.5   Create a vector of your first name.

2.6   Create a vector of your student ID.

2.7   What are the length and data type of the "last name" vector? Why?

 

2.8   Combine your first name, last name and student id into a single

vector ("myinfo“).

2.9   Display "myinfo" in the Console.

2.10 What are the length and data type of "myinfo"?

2.11 Remove the "first_name" object.

2.12 Display "myinfo" in the Console again.

 

2.13 Create a dataframe "roster"  using the following table:

First Last ID

fname1   lname1   1111

fname2   lname2   2222

2.14 View the “roster”.

2.15 Export the data frame “roster” to a csv file.

2.16 Import and view the following csv file:        

http://www.math.smith.edu/sasr/datasets/help.csv

2.17 Remove all the objects in your session.

More products