I read in a csv file with “3:29” in one of the fields (without the quotation marks). This comes up as a factor. How can I convert this to a numeric vector e.g. c(3:29)? I tried as.vector() but this gives a string vector “3,4,5,6…29” (with the quotation marks, still character class).
EDIT Answer needs to be applicable to more general form, for example, the column could contain 3:6,7,9:11, which needs to be converted to the equivalent c(3:6,7,9:11).
You can do: