summarize string data using pipes

I would like to get a count of the unique string identities in the variable "Order_y", grouped by the variable "Virus". This is the code I've been trying and it doesn't seem to be working.

Flavivirus_chordates%>%
group_by(Virus) %>%
distinct (Virus,Order_y) %>%
select(Order_y)%>%
summarize(unique("Order_y"))

Hi!

To help us help you, could you please prepare a reproducible example (reprex) illustrating your issue? Please have a look at this guide, to see how to create one:

perhaps, can remove "" to indicate col name and not string

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.