Skip to content

Commit

Permalink
Update models/sipnet/R/write.configs.SIPNET.R
Browse files Browse the repository at this point in the history
Co-authored-by: Chris Black <[email protected]>
  • Loading branch information
mdietze and infotroph authored Jun 4, 2024
1 parent 212cdfa commit d6a4a3d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions models/sipnet/R/write.configs.SIPNET.R
Original file line number Diff line number Diff line change
Expand Up @@ -460,8 +460,10 @@ write.config.SIPNET <- function(defaults, trait.values, settings, run.id, inputs
if (!is.null(leaf_pheno_path)){
##read data
leafphdata <- utils::read.csv(leaf_pheno_path)
leafOnDay <- dplyr::filter(leafphdata, .data$yea r== obs_year_start & .data$site_id==settings$run$site$id) %>% dplyr::select (.data$leafonday)
leafOffDay<- dplyr::filter(leafphdata, .data$year == obs_year_start & .data$site_id==settings$run$site$id) %>% dplyr::select (.data$leafoffday)
leafOnDay <- dplyr::filter(leafphdata, .data$year == obs_year_start & .data$site_id==settings$run$site$id) %>%
dplyr::select (.data$leafonday)
leafOffDay<- dplyr::filter(leafphdata, .data$year == obs_year_start & .data$site_id==settings$run$site$id) %>%
dplyr::select (.data$leafoffday)
if (!is.na(leafOnDay)){
param[which(param[, 1] == "leafOnDay"), 2] <- leafOnDay
}
Expand Down

0 comments on commit d6a4a3d

Please sign in to comment.