simpleimport | R Documentation |
Quick import of file types Rdata, RDS, rda, csv, txt, xlsx, xls or dta into your R environment.
simpleimport(file, sheet, skip, password = NULL, ...)
file |
Optional; file to import. If not in your working directory the path needs to be included. If not specified a browser will open to select a file. |
sheet |
Optional; sheet name or number within workbooks to import. By default the first tab is imported. |
skip |
Optional; Number of rows from top of the spreadsheet to skip in the import. |
password |
Password for password-protected workbook. |
... |
Optional; other import arguments from the fread for csv, readxl for xls or xlsx or haven for dta files. |
files imported into R
Diane Hatziioanou
# simplewrite(data.frame(a = c(1,2,3), b = c("red", "amber", "green")), "test")
# df <- simpleimport("test.csv")
# simplewrite(data.frame(a = c(1,2,3), b = c("red", "amber", "green")), "test.xlsx")
# df <- simpleimport("test.xlsx")
# simplewrite(data.frame(a = c(1,2,3), b = c("red", "amber", "green")), "test.rds")
# df <- simpleimport("test.rds")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.