Example on data frame
Post date: Jul 1, 2013 9:12:58 PM
Here it is:
# This code demonstrates how to use data frame popularity.prog <- data.frame( program = c("MATLAB", "C++", "Java", "R", "SQL","Octave"), number.users = c(100, 99, 100, 97, 100, 95 ) ) #See the type and class typeof(popularity.prog) class(popularity.prog) # > typeof(popularity.prog) # [1] "list" # > class(popularity.prog) # [1] "data.frame" # > # It's a list, so no surprise, we can do the following popularity.prog$program popularity.prog$number.users typeof(popularity.prog$number.users) # it's double!!!