fake_project/0-import.R

# 0 IMPORT DATA

data(mtcars)

# CYL 4, 6
cyl46 = mtcars[mtcars$cyl %in% c(4, 6), ]
write.table(cyl46, file = "data/0-import-cyl_46-data.csv", quote = F,
            sep = ",", row.names = F)
saveRDS(rownames(cyl46), file = "data/0-import-cyl_46-rownames.rds")

# CYL 8
cyl8 = mtcars[mtcars$cyl == 8, ]
save(cyl8, file = "data/0-import-cyl_8-data&rownames.RData")

save(mtcars, file = "data/test.RData")

rm(list=ls())
jchrom/datamake documentation built on May 18, 2019, 10:23 p.m.