exportSampleList: Create and Export Sample Lists

View source: R/prep_SampleList.r

exportSampleListR Documentation

Create and Export Sample Lists

Description

Creates and exports the randomized sample list to file.

Usage

exportSampleList(
  multiplyRows = FALSE,
  rnd = TRUE,
  md = getmd(),
  showFirstRows = TRUE,
  timeEstimate = FALSE
)

esl(
  multiplyRows = FALSE,
  rnd = TRUE,
  md = getmd(),
  showFirstRows = TRUE,
  timeEstimate = FALSE
)

Arguments

multiplyRows

Logical, defaults to FALSE. If each row in the generated sample list should be multiplied by the number of consecutive scans as specified at nrConScans in the metadata file.

  • FALSE If left at the default FALSE, there is one row for each sample in the sample list. Potential abberations from the planned number of consecutive scans can be noted in the inserted column called conScanError by providing ±n, with 'n' being the number the actual number of consecutive scans is differing from the intended.

  • TRUE If multiplyRows is set to TRUE, each row in the generated sample list is multiplied by the number of consecutive scans as specified at nrConScans in the metadata file. In this case there is no error column allowing to denote errors, but the user has to manually delete or add rows for each sample where the number of consecutive scans is differing from the intended. If rows were added, each cell in the row has to be filled accordingly.

Please also refer to getFullData and the explanations for the argument multiplyRows therein.

rnd

Logical, if the sample list should be randomized or not, defaults to TRUE. (Having a non-randomized sample list can be interesting to check the correctness of the sample list when designing the experiment.

md

An object of class aquap_md containing the metadata of the experiment. Defaults to getmd(), what is calling the default filename for the metadata file. See getmd and metadata_file.

showFirstRows

Logical. If the first rows of the sample list should be displayed.

timeEstimate

Logical. If time estimates should be displayed.

Details

The exclusive format for the sample list is xlsx. When the appropriate values at the bottom of the settings.r file are provided, an approximate time estimate of how long it will take to work through the sample list is given.

Value

An (invisible) data frame with a (randomized) sample list resp. this list saved to a file.

Note

You can provide your own values for how many seconds you need for a single scan etc. at the bottom of the settings.r file to make the time estimate valid.

See Also

Other Import-Export: sampleList_multiplyRows()

Other Core functions: gdmm(), getFullData(), plot,aquap_cube,missing-method, plot,aquap_data,missing-method

Examples

## Not run: 
metadata <- getmd()
sl <- exportSampleList(metadata)
sl <- esl() 	# is the same as above
sl <- esl(md=getmd("myMetadataFile.r"), form="txt", showFirstRows=FALSE)
# this would load the metadata from the file "myMetadataFile.r" and generate 
# a sample list based on these metadata. This would be a rare case, as usually 
# in an experiment home-folder you will have probably only one metadata file 
# but several analysis procedure files.

## End(Not run)

bpollner/aquap2 documentation built on March 29, 2024, 7:33 a.m.