Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- df <- data.frame(abc = c(1, 0, 3, 2, 0),
- foo = c(0, 4, 2, 1, 0),
- glorx = c(0, 0, 0, 1, 2))
- new_col <- c('abc', 'foofoofoofoo', 'abcabcabcfoofoo', 'abcabcfooglorx', 'glorxglorx')
- also_acceptable <- c('abc', 'foofoofoofoo', 'abcfooabcfooabc', 'abcfooglorxabc', 'glorxglorx')
- df %>% mutate(new_col = new_col, also_acceptable = also_acceptable)
Add Comment
Please, Sign In to add comment