Adding csv functionality to saveAllmusoPlots
This commit is contained in:
parent
3195d76bcb
commit
dcddaee7f5
@ -327,7 +327,7 @@ compareMuso <- function(settings=NULL,parameters, variable=1, calibrationPar=NUL
|
||||
|
||||
|
||||
saveAllMusoPlots <- function(settings=NULL, plotName = ".png",
|
||||
silent = TRUE, type = "line",
|
||||
silent = TRUE, type = "line", outFile = "annual.csv",
|
||||
colour = NULL, skipSpinup = FALSE){
|
||||
|
||||
if(is.null(settings)){
|
||||
@ -348,7 +348,7 @@ saveAllMusoPlots <- function(settings=NULL, plotName = ".png",
|
||||
}
|
||||
|
||||
musoYData <- getyearlyout(settings)
|
||||
|
||||
write.csv(musoYData,paste0(settings$outputNames[[2]],outFile))
|
||||
for(i in seq_along(annualVarCodes)){
|
||||
outPlot <- ggplot(data = musoYData, mapping = aes_string(x = "year", y = paste0("var_",annualVarCodes[i])))+
|
||||
geom_bar(stat = "identity")+ labs(y = musoMapping(annualVarCodes[i])) + theme_classic() +
|
||||
|
||||
@ -5,7 +5,8 @@
|
||||
\title{saveAllMusoPlots}
|
||||
\usage{
|
||||
saveAllMusoPlots(settings = NULL, plotName = ".png", silent = TRUE,
|
||||
type = "line", colour = NULL, skipSpinup = FALSE)
|
||||
type = "line", outFile = "annual.csv", colour = NULL,
|
||||
skipSpinup = FALSE)
|
||||
}
|
||||
\arguments{
|
||||
\item{settings}{RBBGCMuso uses variables that define the entire simulation environment. Those environment variables include the name of the INI files, the name of the meteorology files, the path to the model executable and its file name, the entire output list, the entire output variable matrix, the dependency rules for the EPC parameters etc. Using the runMuso function RBBGCMuso can automatically create those environment variables by inspecting the files in the working directory (this happens through the setupMuso function). It means that by default model setup is performed automatically in the background and the user has nothing to do. With this settings parameter we can force runMuso to skip automatic environment setup as we provide the environment settings to runMuso. In a typical situation the user can skip this option.}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user