Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR R

suppress error r

o <- try(1 + "a")
>  Error in 1 + "a" : non-numeric argument to binary operator
o <- try(1 + "a", silent=TRUE)  # no error printed

o <- tryCatch(1 + "a")
> Error in 1 + "a" : non-numeric argument to binary operator
o <- tryCatch(1 + "a", error=function(e){})
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #suppress #error
ADD COMMENT
Topic
Name
7+3 =