skipZero option in sensitivity

This commit is contained in:
Roland Hollós 2020-01-03 13:28:06 +01:00
parent 1c7addccbc
commit 7e721e76ba
3 changed files with 23 additions and 1 deletions

View File

@ -31,6 +31,7 @@ musoMonte <- function(settings=NULL,
debugging = FALSE, debugging = FALSE,
keepEpc = FALSE, keepEpc = FALSE,
constrains = NULL, constrains = NULL,
skipZero = TRUE,
...){ ...){
@ -150,6 +151,11 @@ musoMonte <- function(settings=NULL,
for(j in 1:numVars){ for(j in 1:numVars){
tmp2[j]<-funct[[j]](tmp[,j]) tmp2[j]<-funct[[j]](tmp[,j])
} }
if(skipZero){
if(tmp2[j]==0){
tmp2[j] <- NA
}
}
} else { } else {
for(j in 1:numVars){ for(j in 1:numVars){
tmp2[j]<-NA tmp2[j]<-NA

View File

@ -30,6 +30,7 @@ musoSensi <- function(monteCarloFile = NULL,
plotName = "sensitivity.png", plotName = "sensitivity.png",
plotTitle = "Sensitivity", plotTitle = "Sensitivity",
skipSpinup = TRUE, skipSpinup = TRUE,
skipZero = TRUE,
dpi=300){ dpi=300){
if(is.null(parameters)){ if(is.null(parameters)){
@ -91,7 +92,8 @@ musoSensi <- function(monteCarloFile = NULL,
outVars = outVars, outVars = outVars,
fun = fun, fun = fun,
varIndex = varIndex, varIndex = varIndex,
skipSpinup = skipSpinup skipSpinup = skipSpinup,
skipZero=skipZero
) )
M <- cbind(seq_along(M[,1]),M) M <- cbind(seq_along(M[,1]),M)
yInd <- grep("mod.", colnames(M))[varIndex] yInd <- grep("mod.", colnames(M))[varIndex]

View File

@ -0,0 +1,14 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/getOutPutList.R
\name{getAnnualOutputList}
\alias{getAnnualOutputList}
\title{getAnnualOutputList}
\usage{
getAnnualOutputList(settings = NULL)
}
\arguments{
\item{settings}{bla}
}
\description{
bla bla
}