The code:
a <- structure(list(`X$Days` = c(\"10\", \"38\", \"66\", \"101\", \"129\", \"185\", \"283\", \"374\")), .Names
There are problems with some data. Consider:
as.double(as.character("2.e")) # This results in 2
Another solution:
get_numbers <- function(X) { X[toupper(X) != tolower(X)] <- NA return(as.double(as.character(X))) }