Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
HYCAR-Hydro
airGR
Commits
f1f8041d
Commit
f1f8041d
authored
Oct 25, 2016
by
unknown
Browse files
Fixing the comportment when transfo = "sort"
parent
bf74955c
Changes
1
Hide whitespace changes
Inline
Side-by-side
R/CreateInputsCrit.R
View file @
f1f8041d
...
...
@@ -23,12 +23,12 @@ CreateInputsCrit <- function(FUN_CRIT,InputsModel,RunOptions,Qobs,BoolCrit=NULL,
if
(
!
is.logical
(
BoolCrit
)){
stop
(
"BoolCrit must be a vector of boolean \n"
);
return
(
NULL
);
}
if
(
length
(
BoolCrit
)
!=
LLL
){
stop
(
"BoolCrit and InputsModel series must have the same length \n"
);
return
(
NULL
);
}
if
(
is.null
(
transfo
)
){
stop
(
"transfo must be a chosen among the following: '', 'sqrt', 'log' or 'inv' \n"
);
return
(
NULL
);
}
if
(
!
is.vector
(
transfo
)){
stop
(
"transfo must be a chosen among the following: '', 'sqrt', 'log' or 'inv' \n"
);
return
(
NULL
);
}
if
(
length
(
transfo
)
!=
1
){
stop
(
"transfo must be a chosen among the following: '', 'sqrt', 'log' or 'inv' \n"
);
return
(
NULL
);
}
if
(
!
is.character
(
transfo
)){
stop
(
"transfo must be a chosen among the following: '', 'sqrt', 'log' or 'inv' \n"
);
return
(
NULL
);
}
if
(
transfo
%in%
c
(
""
,
"sqrt"
,
"log"
,
"inv"
)
==
FALSE
){
stop
(
"transfo must be a chosen among the following: '', 'sqrt', 'log' or 'inv' \n"
);
return
(
NULL
);
}
if
(
is.null
(
transfo
)
){
stop
(
"transfo must be a chosen among the following: '', 'sqrt', 'log' or 'inv'
or 'sort'
\n"
);
return
(
NULL
);
}
if
(
!
is.vector
(
transfo
)){
stop
(
"transfo must be a chosen among the following: '', 'sqrt', 'log' or 'inv'
or 'sort'
\n"
);
return
(
NULL
);
}
if
(
length
(
transfo
)
!=
1
){
stop
(
"transfo must be a chosen among the following: '', 'sqrt', 'log' or 'inv'
or 'sort'
\n"
);
return
(
NULL
);
}
if
(
!
is.character
(
transfo
)){
stop
(
"transfo must be a chosen among the following: '', 'sqrt', 'log' or 'inv'
or 'sort'
\n"
);
return
(
NULL
);
}
if
(
transfo
%in%
c
(
""
,
"sqrt"
,
"log"
,
"inv"
,
"sort"
)
==
FALSE
){
stop
(
"transfo must be a chosen among the following: '', 'sqrt', 'log' or 'inv'
or 'sort'
\n"
);
return
(
NULL
);
}
if
(
!
is.null
(
Ind_zeroes
)){
if
(
!
is.vector
(
Ind_zeroes
)){
stop
(
"Ind_zeroes must be a vector of integers \n"
);
return
(
NULL
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment