# Read an example Licor file included in the PhotoGEA package
licor_file <- read_gasex_file(
PhotoGEA_example_file_path('ball_berry_1.xlsx')
)
# Organize the response curve data
licor_file <- organize_response_curve_data(
licor_file,
c('species', 'plot'),
c(),
'Qin'
)
# Plot the average light response curve for each species (here there is only one
# curve for tobacco, so there are no tobacco error bars)
xyplot_avg_rc(
licor_file[, 'A'],
licor_file[, 'Qin'],
licor_file[, 'seq_num'],
licor_file[, 'species'],
ylim = c(0, 50),
xlab = paste0('Incident PPFD (', licor_file$units$Qin, ')'),
ylab = paste0('Average net assimilation (', licor_file$units$A, ')'),
auto = TRUE,
grid = TRUE
)
# Exclude a few points from the data set and re-plot the average curves
licor_file <- remove_points(
licor_file,
list(obs = c(5, 10, 18)),
method = 'exclude'
)
xyplot_avg_rc(
licor_file[, 'A'],
licor_file[, 'Qin'],
licor_file[, 'seq_num'],
licor_file[, 'species'],
subset = licor_file[, 'include_when_fitting'],
ylim = c(0, 50),
xlab = paste0('Incident PPFD (', licor_file$units$Qin, ')'),
ylab = paste0('Average net assimilation (', licor_file$units$A, ')'),
auto = TRUE,
grid = TRUE
)
Run the code above in your browser using DataLab