combineFiles: Combines files from a folder into a single dataframe

View source: R/General_Functions.R

combineFilesR Documentation

Combines files from a folder into a single dataframe

Description

Combines files from a folder into a single dataframe

Usage

combineFiles(
  files,
  pattern = NULL,
  type = "csv",
  sep = NULL,
  stringsAsFactors = F,
  header = T,
  skip = 0,
  combineColumns = F
)

Arguments

files

a list of file paths to the files to be combined.

pattern

Character string of pattern in file name to select files.

type

File type suffix, supported options are "txt" and "csv".

sep

File delimiter, if required.

stringsAsFactors

True or False if strings should be read as factors, defaults to F

header

Should first row be read as file header.

skip

Rows at the start of the file to skip.

combineColumns

Change to TRUE if you want to merge files by columns, default is FALSE which binds files by rows.

Value

Dataframe with all files combined.


allisonglider/seabiRds documentation built on Feb. 14, 2025, 7:37 a.m.