Skip to contents padding-top: 70px;

Extracts oxygen information from a Licor file's preamble and adds it to the main data as a new column so it is easier to access.

Usage

get_oxygen_from_preamble(licor_exdf)

Arguments

licor_exdf

An exdf object representing data from a photosynthetic gas exchange measurement system. The exdf_obj$preamble field must be defined and contain the preamble contents; this will automatically be the case if licor_exdf was created by read_gasex_file.

Details

Licor LI-6800 log files include the oxygen concentration as an entry in the preamble, but it is more helpful to include this information as a column in the main data. The get_oxygen_from_preamble function attempts to move the oxygen concentration (as a percentage) from the preamble into a column.

Value

An exdf object based on licor_exdf that includes the oxygen percentage as a new column called oxygen.

Examples

# Example: Read data from a Licor log file and get the oxygen information from
# the preamble

# Read the file
licor_data <- read_gasex_file(
  PhotoGEA_example_file_path('licor_for_gm_site11.xlsx'),
)

# Here we can see the oxygen percentage in the preamble
str(licor_data$preamble)
#> 'data.frame':	1 obs. of  50 variables:
#>  $ SysConst    : chr NA
#>  $ AvgTime     : chr "4"
#>  $ Oxygen      : chr "21"
#>  $ ChambConst  : chr NA
#>  $ Chamber     : chr "6800-13"
#>  $ Aperture    : chr NA
#>  $ blc_a       : chr "0.43"
#>  $ blc_b       : chr "0.26782699999999998"
#>  $ blc_c       : chr "-1.164018E-4"
#>  $ blc_d       : chr "2.2482019999999999E-3"
#>  $ blc_e       : chr "-5.1094620000000004E-3"
#>  $ blc_minS    : chr "6"
#>  $ blc_maxS    : chr "36"
#>  $ blc_Po      : chr "96.8"
#>  $ LTConst     : chr NA
#>  $ deltaTw     : chr "0"
#>  $ fT1         : chr "1"
#>  $ fT2         : chr "0"
#>  $ fTeb        : chr "0"
#>  $ LQConst     : chr NA
#>  $ Leaf        : chr "standard"
#>  $ Ambient     : chr "Sun+Sky"
#>  $ abs_ambient : chr "0.8"
#>  $ abs_redLED  : chr "0.84"
#>  $ abs_greenLED: chr "0.7"
#>  $ abs_blueLED : chr "0.87"
#>  $ abs_whiteLED: chr "0.75"
#>  $ abs_redFlr  : chr "0.84"
#>  $ abs_blueFlr : chr "0.87"
#>  $ k_ambient   : chr "0.19109999999999999"
#>  $ k_redLED    : chr "0.1512"
#>  $ k_greenLED  : chr "0.161"
#>  $ k_blueLED   : chr "0.22620000000000001"
#>  $ k_whiteLED  : chr "0.1575"
#>  $ k_redFlr    : chr "0.15959999999999999"
#>  $ k_blueFlr   : chr "0.2175"
#>  $ QConst      : chr NA
#>  $ fQ_Amb_in   : chr "0"
#>  $ fQ_Amb_out  : chr "0"
#>  $ fQ_HeadLS   : chr "1"
#>  $ fQ_ConsoleLS: chr "0"
#>  $ fQ_Flr      : chr "0"
#>  $ LeakConst   : chr NA
#>  $ fan_a       : chr "-6276"
#>  $ fan_b       : chr "6.6"
#>  $ fan_c       : chr "1.7090000000000001E-5"
#>  $ fan_d       : chr "3.11"
#>  $ Fs_meas     : chr "9.9798 88.7742 373.458 604.839 838.545 1049.16 1238.82 1421.25"
#>  $ Fs_true     : chr "-0.0182238 101.978 404.227 600.718 801.26 1000.46 1201.87 1400.6"
#>  $ leak_wt     : chr "0"

# Include the oxygen info as a column in the file
licor_data <- get_oxygen_from_preamble(licor_data)

licor_data[, c('replicate', 'oxygen'), TRUE]
#>    replicate [UserDefCon] (NA) oxygen [in] (percent)
#> 1                            1                    21
#> 2                            1                    21
#> 3                            1                    21
#> 4                            1                    21
#> 5                            1                    21
#> 6                            1                    21
#> 7                            1                    21
#> 8                            1                    21
#> 9                            1                    21
#> 10                           1                    21
#> 11                           1                    21
#> 12                           1                    21