fix the cumyield hardcode bug
This commit is contained in:
parent
6a6fad0943
commit
4e338ac75b
@ -89,6 +89,16 @@ plotMuso <- function(settings=NULL,
|
|||||||
musoData <-musoData %>%
|
musoData <-musoData %>%
|
||||||
mutate(date=as.Date(as.character(date),"%d.%m.%Y"))
|
mutate(date=as.Date(as.character(date),"%d.%m.%Y"))
|
||||||
} else {
|
} else {
|
||||||
|
if(!is.element("cum_yieldC_HRV",unlist(settings$outputVars[[1]]))){
|
||||||
|
musoData <- calibMuso(settings,silent = TRUE,skipSpinup=skipSpinup) %>%
|
||||||
|
as.data.frame() %>%
|
||||||
|
tibble::rownames_to_column("date") %>%
|
||||||
|
mutate(date2=date,date=as.Date(date,"%d.%m.%Y")) %>%
|
||||||
|
tidyr::separate(date2,c("day","month","year"),sep="\\.")
|
||||||
|
if(timeFrame!="day"){
|
||||||
|
musoData <- tryCatch(groupByTimeFrame(data=musoData, timeFrame = timeFrame, groupFun = groupFun),
|
||||||
|
error=function(e){stop("The timeframe or the gropFun is not found")})
|
||||||
|
}} else {
|
||||||
musoData <- calibMuso(settings,silent = TRUE,skipSpinup=skipSpinup) %>%
|
musoData <- calibMuso(settings,silent = TRUE,skipSpinup=skipSpinup) %>%
|
||||||
as.data.frame() %>%
|
as.data.frame() %>%
|
||||||
tibble::rownames_to_column("date") %>%
|
tibble::rownames_to_column("date") %>%
|
||||||
@ -99,6 +109,8 @@ plotMuso <- function(settings=NULL,
|
|||||||
musoData <- tryCatch(groupByTimeFrame(data=musoData, timeFrame = timeFrame, groupFun = groupFun),
|
musoData <- tryCatch(groupByTimeFrame(data=musoData, timeFrame = timeFrame, groupFun = groupFun),
|
||||||
error=function(e){stop("The timeframe or the gropFun is not found")})
|
error=function(e){stop("The timeframe or the gropFun is not found")})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
## numVari <- ncol(musoData)
|
## numVari <- ncol(musoData)
|
||||||
@ -211,7 +223,7 @@ plotMuso <- function(settings=NULL,
|
|||||||
plotType = plotType,
|
plotType = plotType,
|
||||||
expandPlot = layerPlot,
|
expandPlot = layerPlot,
|
||||||
plotName = plotName)
|
plotName = plotName)
|
||||||
}
|
}
|
||||||
|
|
||||||
#'plot the BBGCMuso output with data
|
#'plot the BBGCMuso output with data
|
||||||
#'
|
#'
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user