A data frame is a list of vectors of equal length.
Input:
source_code/appendix_b_r/example06_data_frame.r temperatures = data.frame( fahrenheit = c(5,14,23,32,41,50), celsius = c(-15,-10,-5,0,5,10) ) print(temperatures)
Output:
$ Rscript example06_data_frame.r fahrenheit celsius 1 5 -15 2 14 -10 3 23 -5 4 32 0 5 41 5 6 50 10