Importing Data
read.csv reads a CSV file into a data frame and write.csv saves one. readRDS and saveRDS store R objects.
Example
df <- data.frame(a = 1:3, b = c("x", "y", "z"))
f <- tempfile(fileext = ".csv")
write.csv(df, f, row.names = FALSE)
back <- read.csv(f)
print(back)Exercise
Read a CSV.
("data.csv")Quiz Test
These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.