# NOT RUN {
# Convert factors to characters
iris %>%
map_if(is.factor, as.character) %>%
str()
# Specify which columns to map with a numeric vector of positions:
mtcars %>% map_at(c(1, 4, 5), as.character) %>% str()
# Or with a vector of names:
mtcars %>% map_at(c("cyl", "am"), as.character) %>% str()
list(x = rbernoulli(100), y = 1:100) %>%
transpose() %>%
map_if("x", ~ update_list(., y = ~ y * 100)) %>%
transpose() %>%
simplify_all()
# }
Run the code above in your browser using DataLab