Hello,
I am trying to rename a column. Like this: rename(Company \n(Maker-if known) = Brand)
But I keep getting this error message: Error: unexpected '\' in "rename(Company "
Can anyone help?
Thanks.
Hello,
I am trying to rename a column. Like this: rename(Company \n(Maker-if known) = Brand)
But I keep getting this error message: Error: unexpected '\' in "rename(Company "
Can anyone help?
Thanks.
R has rules about what is a valid object name, and this has implications for creating column names;
but basically, if you use quotes you can tell R what is a single name and not a string of commands it doesnt understand. therefore something like
some_data_frame |> rename("Company \n(Maker-if known)" = Brand)
might work if theres such a data frame and it contins Brand etc.
This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.
If you have a query related to it or one of the replies, start a new topic and refer back with a link.