# ensure columns "y" and "z" exist
tibble::tibble(x = 1:3) %>%
introduce(y = "a", z = paste0(y, dplyr::row_number()))
# ensure columns "y" and "z" exist, but do not overwrite "y"
tibble::tibble(x = 1:3, y = c("c", "d", "e")) %>%
introduce(y = "a", z = paste0(y, dplyr::row_number()))
Run the code above in your browser using DataLab