Reputation: 29
I am trying to separate the first column in the attached tibble (a file is called data).
The code I am using looks a follows:
data %>% separate(
`age,unit,sex,indic_em,geo\time`,
into = c('age', 'unit', 'sex', 'indic_em', 'geo\time'),
sep = ',',
remove = F,
convert = T)
Yet, I am receiving this error: Error in eval_tidy(enquo(var), var_env) : object 'age,unit,sex,indic_em,geo\time' not found
Any ideas what can cause the issue? Many thanks!
Upvotes: 0
Views: 385
Reputation: 4357
You're likely running into a problem with using \
which is an escape character in R. Likely you'll need to either escape the backlash with \\
or rename the column to remove the character.
Upvotes: 1