collectData: Collect data from different csv files.

View source: R/collectData.R

collectDataR Documentation

Collect data from different csv files.

Description

Collect data from different csv files.

Usage

collectData(folderName, fileType = NULL, range = NULL, sheetIndex = 1)

Arguments

folderName

A string showing the path of the folder holding different csv files.

fileType

A string showing the file type, e.g. "txt", "csv", "excel".

range

A vector containing startRow, endRow, startColumn, endColumn, e.g., c(2,15,2,3)

sheetIndex

A number showing the sheetIndex in the excel file, if fileType is excel, sheetIndex has to be provided, default is 1.

Value

The collected data from different files in the folder.

Examples


#use internal data as an example.
folder <- file.path(path.package("hyfo"), 'extdata')
# file may vary with different environment, it if doesn't work, use local way to get
# folder path.

a <- collectData(folder, fileType = 'csv', range = c(10, 20, 1,2))

# More examples can be found in the user manual on https://yuanchao-xu.github.io/hyfo/


hyfo documentation built on Aug. 16, 2023, 5:08 p.m.