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?

   
   
   

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?

   
   
   

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?

   
   
   

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