multiple_csv_reader {SangerTools}R Documentation

Read Multiple CSV files into R

Description

This function reads multiple CSVs in a directory must be same structure. This function reads multiple excel files into R after which all files are aggregated into a single data frame.

There are assumptions about they underlying files:

Usage

multiple_csv_reader(file_path, sheet = 1, rows_to_skip = 0, col_names = TRUE)

Arguments

file_path

The Directory in which the files are located

sheet

Sheet to read. Either a string (the name of a sheet), or an integer (the position of the sheet). Defaults to the first sheet

rows_to_skip

The number of rows from the top to be excluded

col_names

If columns are named; defaults to TRUE

Value

a data frame object full of file paths

Examples

library(SangerTools)
file_path <- "my_file_path_where_csvs_are_stored"
if (length(SangerTools::multiple_csv_reader(file_path)) == 0) {
  message("This won't work without changing the variable input to a local file path with CSVs in")
}

[Package SangerTools version 1.0.2 Index]