Learn R Programming

ck37r (version 1.0.3)

import_csvs: Import all CSV files in a given directory and save them to a list.

Description

Import all CSV files in a given directory and save them to a list.

Usage

import_csvs(
  directory = "",
  file_pattern = "\\.csv$",
  recursive = TRUE,
  verbose = TRUE
)

Arguments

directory

Directory to search for files.

file_pattern

File pattern to match.

recursive

Whether or not recurse into subdirectories, default TRUE.

verbose

If True display additional information during execution.

Value

List with files; filenames are the names of the list elements (with extension removed).

Examples

Run this code
# NOT RUN {
library(ck37r)

files = import_csvs("extdata")

names(files)

# }

Run the code above in your browser using DataLab