better error handling
This commit is contained in:
parent
233ec2bf56
commit
20deb229c2
@ -36,6 +36,16 @@ calibMuso <- function(settings,parameters=NULL, timee="d", debugging=FALSE, logf
|
|||||||
epc <- settings$epcinput
|
epc <- settings$epcinput
|
||||||
calibrationpar <- settings$calibrationpar
|
calibrationpar <- settings$calibrationpar
|
||||||
whereAmI<-getwd()
|
whereAmI<-getwd()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
##########################################################################
|
||||||
|
###########################Defining Functions########################
|
||||||
|
########################################################################
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#############################################################
|
#############################################################
|
||||||
############################spinup run############################
|
############################spinup run############################
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
#' This is the function which is capable change multiple specific lines to other using their row numbers.
|
#' This is the function which is capable change multiple specific lines to other using their row numbers.
|
||||||
#'
|
#'
|
||||||
#' he function uses the previous changspecline function to operate.
|
#' he function uses the previous changspecline function to operate.
|
||||||
@ -14,7 +13,7 @@ changemulline <- function(filename,calibrationpar,contents){
|
|||||||
varnum <- length(calibrationpar)
|
varnum <- length(calibrationpar)
|
||||||
if(length(contents)!=varnum)
|
if(length(contents)!=varnum)
|
||||||
{
|
{
|
||||||
cat("Error: number of the values is not the same as the number of the changed parameters")
|
stop(" number of the values is not the same as the number of the changed parameters")
|
||||||
}
|
}
|
||||||
|
|
||||||
TOT=readLines(filename,-1)
|
TOT=readLines(filename,-1)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user