Reputation: 81
I'm trying to create a variable with the same value for each case. Here is the R code that I've tried writing using mutate:
dataset1 %>% as_tibble() %>% mutate(
pop2 = 55000000
)
dataset1 %>%
mutate(pop2 = 55000000)
They are both creating new variables within the dataframe. Can I also write this to the dataset?
Upvotes: 2
Views: 73