Summarise - Error: `n()` must only be used inside dplyr verbs

Viewed 11476

I'm trying to do a very simple count using the following code:

Bar_data_TEST <- Bar_data %>%
  group_by(metric) %>%
  summarise(n = n())

but keep getting the above error and I have no idea why - any ideas?

0 Answers
Related