fun.AggregateData.File: Aggregate Data Files, File

View source: R/zfun.AggregateData.File.R

fun.AggregateData.FileR Documentation

Aggregate Data Files, File

Description

Subfunction for aggregating or splitting data files. Needs to be called from ContDataQC(). Combines (appends) all provided filesp. Saves a new CSV in the export directory. The 'file' version works on a vector of files.

Usage

fun.AggregateData.File(
  fun.myFile,
  fun.myDir.import = getwd(),
  fun.myDir.export = getwd(),
  fun.myReport.format,
  fun.myReport.Dir,
  fun.CreateReport = TRUE
)

Arguments

fun.myFile

Vector of file names.

fun.myDir.import

Directory for import data. Default is current working directory.

fun.myDir.export

Directory for export data. Default is current working directory.

fun.myReport.format

Report format (docx or html). Default is specified in config.R (docx). Can be customized in config.R; ContData.env$myReport.Format.

fun.myReport.Dir

Report (rmd) template folder. Default is the package rmd folder. Can be customized in config.R; ContData.env$myReport.Dir.

fun.CreateReport

Boolean parameter to create reports or not. Default = TRUE.

Value

Returns a csv into the specified export directory of each file appended into a single file.

Examples

#Not intended to be accessed indepedant of function ContDataQC().
myFile <- c("QC_test2_Aw_20130426_20130725.csv"
            , "QC_test2_Aw_20130725_20131015.csv"
            , "QC_test2_Aw_20140901_20140930.csv")
myDir.import <- file.path(getwd(),"Data2_QC")
myDir.export <- file.path(getwd(),"Data3_Aggregated")
fun.AggregateData.File(myFile, myDir.import, myDir.export)

leppott/ContDataQC documentation built on Jan. 5, 2025, 10:12 a.m.