I have a column with 3 types of information: numeric, percentage, and character. I would like to create two new columns from this, one with only the character information being the remaining "NA" cells and another column with only the numeric information getting the character information and the other "NA" information in this new column. Objective is to create two new columns from the Code column. One with the numbers and another with the codes (factor).
dput(head(estudo, 10)) structure(list(Potreiro = structure(c(3L, 3L, 3L, 3L, 3L, 4L, 3L, 4L, 3L, 4L), .Label = c("1A", "6B", "7A", "7B"), class = "factor"), Code = structure(c(4L, 1L, 8L, 3L, 2L, 4L, 6L, 5L, 8L, 7L ), .Label = c("2", "3", "4", "5", "50%", "70%", "ac", "ad", "av", "cd", "de", "Dem"), class = "factor")), .Names = c("Potreiro", "Code"), row.names = c(NA, 10L), class = "data.frame")