Skip to content
Snippets Groups Projects
Commit d0a08f22 authored by Mauricio Zambrano-Bigiarini's avatar Mauricio Zambrano-Bigiarini
Browse files

plot\_NparOF.R: added checking for 'gofs'

parent 312530e4
No related branches found
No related tags found
No related merge requests found
...@@ -48,7 +48,7 @@ plot_NparOF <- function(params, ...@@ -48,7 +48,7 @@ plot_NparOF <- function(params,
stop("Missing argument: 'params' must be provided !!" ) stop("Missing argument: 'params' must be provided !!" )
# Number of parameter sets # Number of parameter sets
n <- nrow(params) n <- NROW(params)
# Checking 'gofs' # Checking 'gofs'
if (missing(gofs)) { if (missing(gofs)) {
......
...@@ -82,11 +82,17 @@ plot_particles <- function(##################################################### ...@@ -82,11 +82,17 @@ plot_particles <- function(#####################################################
# Checking that 'params' exists # Checking that 'params' exists
if ( missing(params) ) stop( "Missing argument: 'params'" ) if ( missing(params) ) stop( "Missing argument: 'params'" )
# Checking that 'gofs' exists
if ( missing(gofs) ) stop( "Missing argument: 'gofs'" )
# number of parameters # number of parameters
nparam <- ncol(params) nparam <- ncol(params)
# Number of parameter sets
n <- NROW(params)
# Checking 'gofs'
if (missing(gofs)) {
stop("Missing argument: 'gofs' must be provided !!" )
} else if (length(gofs) != n)
stop("Invalid argument: 'length(gofs) != nrow(params)' (", length(gofs), "!=", n, ") !!" )
# Parameter names # Parameter names
param.names <- colnames(params) param.names <- colnames(params)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment