import: Import a dataset

View source: R/import.R

importR Documentation

Import a dataset

Description

This import function can import data from delimited text files, simple JSON files, EXCEL spreadsheets, and statistical packages such as SAS, SPSS, and Stata. This wonderful.

Usage

import(file, ...)

Arguments

file

datafile to import.

...

parameters passed to the import function.

Details

The import function is wrapper for the haven, readxl, rjson and vroom packages.

Value

a data frame

Note

Complex nested JSON files will not be imported properly.

See Also

read_sas, read_dta, read_spss, read_excel, fromJSON, vroom

Examples

## Not run: 
# import a comma delimited file
mydataframe <- import("mydata.csv")

# import a SAS binary file
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)

Rkabacoff/importR documentation built on Dec. 5, 2023, 3:26 p.m.