getDataFiles: Merge multiple data files

Description Usage Arguments Value Author(s) Examples

View source: R/getDataFiles.R

Description

Load multiple csv files into a unique data frame. A function to load all csv files within a given directory and merge data into a unique data frame.

Usage

1
2
getDataFiles(folder, targetCol = NULL, separator = ";", toSkip = 0,
  rowToRead = -1, addSubj = NULL)

Arguments

folder

A string indicating the relative path of the folder in which are stored the csv files

targetCol

A vector of numbers to precise which columns should be read. Defaults to all columns.

separator

A string indicating the symbol use to differentiate the columns (, ; \t). Defaults to ";".

toSkip

A number to indicate how many lines (rows) should be ignored before reading the file. Defaults to 0.

rowToRead

A number to indicate how many lines (rows) should be read from the starting reading line. Defaults to all lines.

addSubj

Either a vector of 2 numbers to indicate the first and last character index of the csv file name to extract the subject name or a boolean index to TRUE to add a subject number equal to the process order of the file. Defaults to NULL to indicate that a subject identification is present.

Value

Return a data frame with all data bind by rows.

Author(s)

Guillaume T. Vallet gtvallet@gmail.com, University of Montreal (Canada)

Examples

1

Cogitos/predata documentation built on May 6, 2019, 12:21 p.m.