sample_list: sample_list: generates a simplified sample list containing...

Description Usage Arguments Examples

View source: R/mfafunctions96.R

Description

sample_list: generates a simplified sample list containing unique IDs and optional duration between reads.

Usage

1
sample_list(imp_xml, calc_duration)

Arguments

imp_xml:

An internal xml document imported via xml2::read_xml().

calc_duration: A logical variable indicating whether to return estimated consumption duration. Default calc_duration = FALSE.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
imp_xml = xml2::read_xml(xml_doc_path)

# Get all reads for double checking
all_reads = import_plates(imp_xml)

print(all_reads)

Output:
ID               Project   Line    Assay   ReadTime
HARD_0000_SPEC    HARD     0000    SPEC    2020-07-02 11:54:00
HARD_0000_SPEC    HARD     0000    SPEC    2020-07-03 08:49:00
HARD_TAPE_SPEC    HARD     TAPE    SPEC    2020-07-02 14:10:00
HARD_TAPE_SPEC    HARD     TAPE    SPEC    2020-07-03 10:53:00

# Calculate consumption times from matching IDs
consumption_times = sample_list(imp_xml, calc_duration = TRUE)

print(consumption_times)

ID               Project  Line       Assay   Duration(hr)
HARD_0000_SPEC    HARD     0000      SPEC    20.9166666666667
HARD_TAPE_SPEC    HARD     TAPE      SPEC    20.7166666666667

jwalte5/mfa96 documentation built on April 10, 2021, 4:36 p.m.