readit {readit}R Documentation

Read Files of Any Type

Description

Given a file path, read the data into R, regardless of file type/extension. readit is a thick wrapper around many of the tidyverse libraries, but can be forced to use base functions where possible. Note that the caveat is that the file needs to have an extension, as well as be of a relatively common type. "Common types" are any file type that can be handled by the readr, readxl, or haven packages.

Usage

readit(.data, ..., tidyverse = TRUE)

Arguments

.data

File path to read data from.

...

Additional arguments passed to tidyverse read functions, e.g. sheet, n_max, etc.

tidyverse

Should readit use functions available in the tidyverse, e.g. functions from readr, etc.? Defaults to TRUE.

Examples

readit(system.file("examples", "csv.csv", package = "readit"))
readit(system.file("examples", "tab_sep.txt", package = "readit"))
readit(system.file("examples", "semi_sep.txt", package = "readit"))
readit(system.file("examples", "xlsx.xlsx", package = "readit"))
readit(system.file("examples", "xls.xls", package = "readit"))
readit(system.file("examples", "iris.sas7bdat", package = "readit"))


[Package readit version 1.0.0 Index]