Open amyerspigg opened 1 month ago
@stephpenn1
This error is happening because your data frame pw_ft
doesn't have any during-event ("Mid") data points. So it cannot execute the line
mutate(max_effect_Mid = case_when(
avg_Mid > avg_Pre ~ max_Mid,
avg_Mid < avg_Pre ~ min_Mid,
avg_Mid == avg_Pre ~ avg_Mid
))
https://github.com/COMPASS-DOE/TEMPEST-1-porewater/blob/53f892c60a0f508dd230e24239136c4217cb9d1e/scripts/analysis_scripts/1_manuscript_analysis_porewaterDOC.Rmd#L279
error:
Error in
mutate()
: ℹ In argument:max_effect_Mid = case_when(...)
. Caused by error incase_when()
: ! Failed to evaluate the left-hand side of formula 1. Caused by error: ! object 'avg_Mid' not found Backtrace:Caused by error in
case_when()
: ! Failed to evaluate the left-hand side of formula 1. Caused by error: ! object 'avg_Mid' not foundI checked and there should be data for the mid-point (at least one timepoint) so not sure what's going on