fito <- c("forest", "savaaaana", "brae soil", "bare soil", "savanna", "froest") id <- 1:6 df <- data.frame(fito = as.factor(fito), id = id)
What is the smartest way to replace the wrong typed data ("savaaaana", "brae soil", "froest")
with the correct data ("savanna", "bare soil", "forest")
?
At the beginning I have six factors. The correct is to have only three.
How can I do this using the tidyverse package?
https://stackoverflow.com/questions/65819486/what-is-the-most-efficient-way-to-correct-text-type-data-in-a-column January 21, 2021 at 08:14AM
没有评论:
发表评论