
all.is.numeric(x, what = c("test", "vector"))
what="vector"
to return a numeric vector if
it passes the test, or the original character vector otherwisewhat="test"
or a vector otherwiseas.numeric
all.is.numeric(c('1','1.2','3'))
all.is.numeric(c('1','1.2','3a'))
all.is.numeric(c('1','1.2','3'),'vector')
all.is.numeric(c('1','1.2','3a'),'vector')
Run the code above in your browser using DataLab