mutate() error

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

mutate() error

R help mailing list-2
Dear all,

I'm using this in a function inside a package. The code works fine when I
run it directly.
df %>%
   mutate(!!id_column := row_number())

When I run the function I get this error:
Error in mutate(., `:=`(!!id_column, row_number())) :
  argument "mutate" is missing, with no default

df is a data.frame, id_column a string, all functions are imported.

Can someone explain to me why I'm getting this error?

Best regards,

ir. Thierry Onkelinx
Statisticus / Statistician

Vlaamse Overheid / Government of Flanders
Team Biometrie & Kwaliteitszorg / Team Biometrics & Quality Assurance
[hidden email]
Havenlaan 88 bus 73, 1000 Brussel

To call in the statistician after the experiment is done may be no more
than asking him to perform a post-mortem examination: he may be able to say
what the experiment died of. ~ Sir Ronald Aylmer Fisher
The plural of anecdote is not data. ~ Roger Brinner
The combination of some data and an aching desire for an answer does not
ensure that a reasonable answer can be extracted from a given body of data.
~ John Tukey


        [[alternative HTML version deleted]]

[hidden email] mailing list -- To UNSUBSCRIBE and more, see
PLEASE do read the posting guide
and provide commented, minimal, self-contained, reproducible code.