import: Import a dataset

Description Usage Arguments Details Value See Also Examples

View source: R/import.R

Description

The import function can import data from deliminated text files, EXCEL, spreadsheets, and statistical packages such as SAS, SPSS, and Stata

Usage

1

Arguments

file

datafile to import. If missing, the user is prompted to select a file interactively.

...

parameters passed to the import function. See details below

Details

The import function is a wrapper for the haven, realxl. and vroom packages

Value

a data frame

See Also

read_sas, read_dta, read_spss, read_excel, vroom

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## Not run: 
# import a comma delimited file
mydataframe <- import("mydata.csv)

# import a SAS binary datafile
mydataframe <- import("mydata.sas7bdat")

# import the second worksheet of an Excel workbook
mydataframe <- import("mydata.xlsx, sheet = 2)

 # prompt for a file to import
 mydataframe <- import()
 
## End(Not run)

arifaabbas/importR documentation built on Dec. 19, 2021, 4:38 a.m.