organize_response_curve_data {PhotoGEA}R Documentation

Reorganize response curve data for analysis and plotting

Description

Prepares a set of response curves for future processing and analysis by numbering and reordering the points, (optionally) removing recovery points, and (optionally) calculating average values of key variables across each curve.

Usage

  organize_response_curve_data(
    licor_exdf,
    identifier_columns,
    measurement_numbers_to_remove,
    column_for_ordering,
    ordering_column_tolerance = Inf,
    columns_to_average = c(),
    print_information = TRUE
  )

Arguments

licor_exdf

An exdf object representing response curve data from a Licor gas exchange measurement system.

identifier_columns

A vector or list of strings representing the names of columns in licor_exdf that, taken together, uniquely identify each curve. This often includes names like plot, event, replicate, etc.

measurement_numbers_to_remove

A vector of integers specifying which points to remove from each curve; for example, if each curve has 16 points and the 10^th^ and 11^th^ points along the sequence should not be included in subsequent analysis, measurement_numbers_to_remove could be specified as c(10, 11). If measurement_numbers_to_remove is set to c(), no points will be removed.

column_for_ordering

The name of a column that is systematically varied to produce each curve; for example, in a light response curve, this would typically by Qin.

ordering_column_tolerance

To be passed to check_response_curve_data as the driving_column_tolerance input argument.

columns_to_average

A list of columns whose average values should be calculated; see below for details.

print_information

To be passed to check_response_curve_data.

Details

For an exdf object consisting of multiple response curves that can be identified using the values of its identifier_columns, this function performs the following actions:

Removing certain points is often helpful for A-Ci curves, where the CO~2~ concentration begins at the ambient value, is decreased to a low value, is reset to atmospheric for several measurements to allow the plant to reacclimate, and then is increased to higher values. In this case, only the first measurement at ambient CO~2~ is used for plotting or additional analysis, and the "recovery" points should be removed.

Reordering the points is often helpful for plotting. For example, the points in an A-Ci curve would not be ordered according to their Ci values in a curve measured using a sequence as described above. This can cause issues when making line plots, so it may be convenient to reorder them according to their Ci values.

Calculating average values of certain columns is especially useful for estimating Jmax values using calculate_jmax, since this operation requires average values of leaf temperature and incident photon flux across each curve.

Value

An exdf object based on licor_exdf but processed as described above.

Examples

# Read an example Licor file included in the PhotoGEA package and organize it.
# This file includes several 7-point light-response curves that can be uniquely
# identified by the values of its 'species' and 'plot' columns. Since these are
# light-response curves, each one follows a pre-set sequence of `Qin` values.
licor_file <- read_gasex_file(
  PhotoGEA_example_file_path('ball_berry_1.xlsx')
)

# Split the data into individual curves, keep all seven measurement points in
# each curve, and order them by their incident light values (since these are
# light response curves). The curves were measured from high to low values of
# `Qin`, so after organizing the curves, their order will be reversed from the
# original version. Also add the average value of TleafCnd and Qin for each
# curve.
licor_file <- organize_response_curve_data(
  licor_file,
  c('species', 'plot'),
  c(),
  'Qin',
  columns_to_average = c('TleafCnd', 'Qin')
)

# View a subset of the data, including the new `seq_num` column
print(licor_file[, c('species', 'plot', 'seq_num', 'Qin', 'A', 'Qin_avg'), TRUE])

[Package PhotoGEA version 1.3.3 Index]