I have the situation:
vector_a <- c("a", "b", "c", "x", "y", "z")
vector_b <- c("a", "b", "c")
vector_missing_columns <- vector_a %>% setdiff(vector_b)
df_test <- data_frame("a" = 1, "b" = 2, "c" = 3)
I am looking for a way to create new columns in dataframe "df_test" from the vector "vector_missing_columns".
What I have tried unsuccessfully:
df_new <- df_test %>% mutate_at(vector_missing_columns, funs(NA))