fun.Stats.File: Statistical Summary, File

View source: R/fun.Stats.File.R

fun.Stats.FileR Documentation

Statistical Summary, File

Description

Subfunction for generating statistical summaries. Needs to be called from ContDataQC(). Requires doBy() and survival() [required by doBy] Calculates statistics on input data and saves to a new csv. Plots are saved as PDF. The 'file' version works on a single (or vector) of files.

Usage

fun.Stats.File(
  fun.myFile,
  fun.myDir.import = getwd(),
  fun.myDir.export = getwd(),
  fun.myReport.format,
  fun.myReport.Dir
)

Arguments

fun.myFile

Single (or vector of) file name(s).

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.

Value

Returns a csv into the specified export directory with additional columns for calculated statistics. And a PDF of summary plots by different time periods.

Examples

myFile <- "QC_test2_Aw_20130426_20130725.csv"
#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(),"Data4_Stats")
fun.Stats.File(myFile, myDir.import, myDir.export)

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