Lumenize icon indicating copy to clipboard operation
Lumenize copied to clipboard

R function data.frame()

Open jmaccherone opened this issue 12 years ago • 2 comments

The data.frame() function takes a list (of columns) where each element in the list is a vector (data set). Each vector is the same length.

myFamily <- data.frame(myFamilyNames, myFamilyAges, myFamilyGenders, myFamilyWeights)

A dataframe outputs as a table where the vector names are the column labels and each row is numbered.

jmaccherone avatar May 08 '13 16:05 jmaccherone

I'm not following. Can you add a more detailed example?

lmaccherone avatar Jun 16 '13 23:06 lmaccherone

Here is a data.frame called mtcars.

screen shot 2013-06-26 at 8 49 47 am

jmaccherone avatar Jun 26 '13 12:06 jmaccherone