I have to create a function which will detect if there is any non numeric value present in input. For this I have written this code
test<-function(x){
if(is.numeric(x)){
return(T)
}else{
return(F)
}
}
However when I test it with say
> test(a123)
Error in test(a123) : object 'a123' not found
But it works when i use quotes
> test("a123")
[1] FALSE
However I want it working in the first form. Any help on this will be greatly appreciated