poissonconsulting / tidyplus

An R package of additional tidyverse functions
https://poissonconsulting.github.io/tidyplus/
Other
9 stars 0 forks source link

Modify `add_missing_column` so that can use existing column if exists. #18

Open joethorley opened 3 months ago

joethorley commented 3 months ago
library(tidyplus)

x <- data.frame(y = 1:2)

add_missing_column(x, z = .data$y)
#> Error in `.data$y`:
#> ! Column `y` not found in `.data`.

Created on 2024-07-27 with reprex v2.1.1