I have very simple question. I have a df like,
df1 <- data.frame(id=c(1,2,3))
I want to add a new column by adding \'z000\' to existing id
You just need paste0
paste0
df1 %>% mutate(new_id = paste0("z000", id)) id new_id 1 1 z0001 2 2 z0002 3 3 z0003