Skip to contents

Reads a single element of replicate, macro evaluation or micro evaluation data from the current scenario

Usage

readAllData(
  dataType = c("ReplicateData", "MicroEvaluation", "MacroEvaluation"),
  workingPath = getwd(),
  dirName = dataType,
  prefix = switch(dataType, ReplicateData = "replicate", MicroEvaluation = "micro",
    MacroEvaluation = "macro"),
  replicates = NULL,
  consolidate = TRUE,
  replicateCol = getEctdColName("Replicate"),
  method = getEctdDataMethod()
)

Arguments

dataType

(Optional) The type of data you wish to read - either "ReplicateData", "MacroEvaluation" or "MicroEvaluation". Default is "ReplicateData"

workingPath

(Optional) The working path of the current scenario. The current working directory is used by default.

dirName

(Optional) Subdirectory of workingPath from which to read data. By default, this is taken as the same as the "dataType" input

prefix

(Optional) Prefix of file name to use (eg. "micro" for Micro Evaluation files). Default is "Replicate" when dataType is "ReplicateData", "Micro" when dataType is "MicroEvaluation" or "Macro" when dataType is "MacroEvaluation"

replicates

(Optional) A vector identifying a subset of replicates to import from the directory. By default, all replicates are imported

consolidate

(Optional) Should the function combine the seperate data frames into a single data frame. TRUE by default

replicateCol

(Optional) Name for created "Replicate" variable in the consolidated data frame (default given by getEctdColName)

method

(Optional) Data storage method (i.e. where to extract the data from). Given by getEctdDataMethod by default

Value

If consolidate is FALSE, the function will return a list of data frames. If consolidate is TRUE, the function will combine this list into a single data frame for return

See also

Author

Mike K Smith mstoolkit@googlemail.com

Examples


  if (FALSE) {
   readAllData(dataType = "Macro", consolidate = FALSE)
   readAllData(dataType = "Micro")
 }