Learn R Programming

hyfo (version 1.3.4)

collectData: 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

Run this code
#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 http://yuanchao-xu.github.io/hyfo/

Run the code above in your browser using DataLab