What does the following R code do?
df <- data.frame(name = c("Alice", "Bob", "Charlie"),
age = c(25, 30, 22))
Creates a matrix with two columns: "name" and "age"
Creates a data frame with two columns: "name" and "age"
Creates a list with two elements: "name" and "age"
Raises an error due to incorrect syntax
This question is part of this quiz :
R Programming Quiz