Skip to content
Prev 76130 / 398502 Next

Converting characters to numbers in data frames

Anon. wrote:
How about this?

NUMBERS <- lapply(strsplit(NAMES, "\\."), "[", -1)
as.data.frame(do.call("rbind", lapply(NUMBERS, as.numeric)))

--sundar