R Data Frames
A data frame is a table of columns, each a vector. It is the central structure of R. Use $, [ , ], nrow, ncol, head, str and summary.
Example
df <- data.frame(name = c("Ada", "Tunde", "Zed"), score = c(90, 72, 85))
print(df); print(nrow(df)); print(df$score)
print(df[df$score > 80, ])Exercise
Create a table.
df <- (a = 1:3)
Quiz Test
These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.