getReplicates: Trial replicates vector

getReplicatesR Documentation

Trial replicates vector

Description

Get a vector of available trial replicates, based on a specified data storage method

Usage

getReplicates(
  path = "ReplicateData",
  prefix = "replicate",
  method = getEctdDataMethod(),
  workingPath = getwd()
)

Arguments

path

The subdirectory (within "workingPath") containing the replicates files ('CSV' and 'RData' methods only)

prefix

Prefix to used when looking for simulated data files

method

Data storage method in use, either "CSV", "RData" or "Internal (given by getEctdDataMethod by default)

workingPath

Root path for simulated data (default is working directory)

Details

This function looks for existing replicates based on the method, directories and file prefix given.

If method is "CSV", the function looks for files starting with "prefix" and ending in ".csv" within the "path" subdirectory of "workingPath" Similarly, if method is "RData", the function looks for files starting with "prefix" and ending in ".rdata" in the same location If method is "Internal", the function looks for data frames found in the internal data storage location (.ectdEnv$DataStore)

The function will return a vector of replicate numbers, or fail if no replicates are found

Value

A numeric vector of replicate values

Examples


  ## Not run: 
	 getReplicates()
  
## End(Not run)


MikeKSmith/MSToolkit documentation built on Feb. 15, 2024, 5:32 p.m.