View source: R/calculate_total_pressure.R
calculate_total_pressure | R Documentation |
Calculates the total pressure in bar
. Licor gas exchange measurement
systems report both the abient air pressure (Pa
) and the chamber
overpressure (DeltaPcham
) in kPa
; the total pressure in the
chamber is therefore given by the sum of these two columns. This function can
accomodate alternative column names for the variables taken from Licor log
files in case they change at some point in the future. This function also
checks the units of each required column and will produce an error if any
units are incorrect.
calculate_total_pressure(
exdf_obj,
pa_column_name = 'Pa',
deltapcham_column_name = 'DeltaPcham'
)
exdf_obj |
An |
pa_column_name |
The name of the column in |
deltapcham_column_name |
The name of the column in |
If deltapcham_column_name
is NA
, this function will simply
convert the values in the pa_column_name
to units of bar
.
Otherwise, the values from the pa_column_name
and
deltapcham_column_name
columns will be added together and converted to
bar
.
An exdf
object based on exdf_obj
that includes the total
pressure values in a new column called total_pressure
. The category of
this new column is calculate_total_pressure
to indicate that it was
created using this function.
# Read an example Licor file included in the PhotoGEA package and calculate the
# total pressure.
licor_file <- read_gasex_file(
PhotoGEA_example_file_path('ball_berry_1.xlsx')
)
licor_file <- calculate_total_pressure(licor_file)
licor_file$units$total_pressure # View the units of the new `total_pressure` column
licor_file$categories$total_pressure # View the category of the new `total_pressure` column
licor_file[, 'total_pressure'] # View the values of the new `total_pressure` column
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.