simpleimportforce: Import various formats of files into R with one command.

View source: R/read_write.R

simpleimportforceR Documentation

Import various formats of files into R with one command.

Description

Quick import of file types Rdata, RDS, rda, csv, txt, xlsx, xls or dta into your R environment.

Usage

simpleimportforce(file, sheet, skip, password = NULL, ...)

Arguments

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.

Value

files imported into R

Author(s)

Diane Hatziioanou

Examples


# simplewrite(data.frame(a = c(1,2,3), b = c("red", "amber", "green")), "test")
# df <- simpleimportforce("test.csv")

# simplewrite(data.frame(a = c(1,2,3), b = c("red", "amber", "green")), "test.xlsx")
# df <- simpleimportforce("test.xlsx")


# simplewrite(data.frame(a = c(1,2,3), b = c("red", "amber", "green")), "test.rds")
# df <- simpleimportforce("test.rds")



DHatziioanou/simpleepi documentation built on Sept. 24, 2024, 5:25 a.m.