# Creating and accessing data frames # Create two vectors of different types kids<-c("Jack", "Jill") ages<-c(12,10) # Build a dataframe from the vectors d<-data.frame(kids, ages, stringsAsFactors = FALSE) # Display the data frame d # Access the data frame # Using tags d$kids d$ages # Using list indices d[[1]] d[[2]] # Using matrix indices d[1,] d[2,] d[,1] d[,2]