You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm getting an unexpected error, originating in stringr, associated with use of sfn_metrics() or daylight_metrics() when the tidy = TRUE argument is used.
library(dplyr, warn.conflicts=F)
library(sapfluxnetr)
SAPFLUXNET.ROOT<-'...'SAPFLUXNET.DIR<- paste0(SAPFLUXNET.ROOT, '/Rdata/plant')
# Build the metadata tablessfn.metadata<- read_sfn_metadata(
folder=SAPFLUXNET.DIR, .write_cache= file.exists(paste0(SAPFLUXNET.DIR, '/.metadata_cache.RData')))
# Filter out sites that have been managed or treated with drought/irrigation# treatments or CO2 enrichmentsites.of.interest<- sfn_sites_in_folder(SAPFLUXNET.DIR) %>%
filter_sites_by_md(
si_igbp!='WET', # Can't use these sites!(st_treatment%in% c('Irrigated', 'Post Irrigation', 'drought', 'Girdling early successional',
'ELEVATED CO2 treatments maintained at 550 ppm', 'Elevated atmospheric CO2')),
!grepl('a very high degree of heterogeneity', st_remarks),
!grepl('Irrigation of the experimental grove', st_remarks),
metadata=sfn.metadata)
I see that this arises when tidy = TRUE but the metadata argument is not provided. I think that a more helpful error message could be raised, instead of letting stringr catch the fault.
Hello,
I'm getting an unexpected error, originating in
stringr
, associated with use ofsfn_metrics()
ordaylight_metrics()
when thetidy = TRUE
argument is used.This works just fine:
But when I add
tidy = TRUE
, I get an error:My
sessionInfo()
:The text was updated successfully, but these errors were encountered: