# NOT RUN {
x1 <- c("+4"," + 5","6","bb","Na","-7")
convToNum(x1,convert=c("allChar"))
convToNum(x1) # too many non-numeric instances for 'sparseChar'
x2 <- c("+4"," + 5","6","-7"," - 8","1e6","+ 2.3e4","-3E4","- 4E5")
convToNum(x2,convert=NA,remove=c("allChar",NA))
convToNum(x2,convert=NA,remove=c("allChar",NA),sciIncl=FALSE)
# }
Run the code above in your browser using DataLab