15.071 | Spring 2017 | Graduate

The Analytics Edge

1.3 Working with Data: An Introduction to R

1.3 Working with Data: An Introduction to R

Quick Question

If you want to add new observations to a data frame, what should you use?

 The data.frame function.  close
   
 The rbind function.  check
   
 The dollar sign notation.  close
   
Check Show Solution

Explanation To add new observations to a data frame with the same variable values, you should use rbind.

If you want to combine two vectors into a data frame, what should you use?

 The data.frame function.  check
   
 The rbind function.  close
   
 The dollar sign notation.  close
   
Check Show Solution

Explanation To combine two vectors into a data frame, you should use data.frame.

If you want to add a variable to your data frame, what should you use?

 The data.frame function.  close
   
 The rbind function.  close
   
 The dollar sign notation.  check
   
Check Show Solution

Explanation To add a variable to your data frame, you should the dollar sign notation.

Course Info

As Taught In
Spring 2017
Level
Learning Resource Types
Lecture Videos
Lecture Notes
Problem Sets with Solutions