get_data: Import data from multiple files

Description Usage Arguments

View source: R/get_data.R

Description

Specify file location and import data from multiple files either recursively or directly in the folder. Outputs a data frame with correct folder names for each row.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
get_data(
  filepath,
  pattern,
  recursive = TRUE,
  delim = "\t",
  skip_rows = FALSE,
  progress = FALSE,
  show_col_types = FALSE,
  trim_ws = FALSE,
  col_types = NULL,
  col_names = TRUE,
  quoted_na = TRUE,
  convert = FALSE,
  df = TRUE
)

Arguments

filepath

The path to the files/folders

pattern

The pattern in the files you want imported

recursive

Logical, search in sub folders or not?

delim

Single character used to separate fields within a record, (see read_delim)

skip_rows

Ignore blank rows? (see read_delim)

progress

Show progress for data import? (see read_delim)

show_col_types

List column types? (see read_delim)

trim_ws

Should leading and trailing whitespace be trimmed? (see read_delim)

col_types

One of NULL, a cols() specification, or a string, (see read_delim)

col_names

Logical, does the data have column names or not? (see read_delim)

quoted_na

Should missing values inside quotes be treated as missing values (the default) or strings? (see read_delim)

convert

Should all columns in the resulting data frame be converted to character?

df

Should the results be converted to a data frame?


hkaspersen/impoRt documentation built on Jan. 30, 2022, 4:14 p.m.