example dataframe likes this:
dataframe <- (consultants_name = c(CHINA, USA ,JAPAN, BRITISH, BRITISH, USA ,USA, BRITISH,CHINA,JAPAN ,JAPAN, BRITISH,etc),
goods = c(computers, phone , telescopes , bowls , footballs, telescopes , computers,etc))
i want to count the amount of categories of goods from different countries, like china have 2 kinds of goods
I type the function below, help me correct them and explain it to me, thinks a lot.
group_by (country_name) %>%
summarise(amount of goods = count(country_name))
R notes to me that an error occurred in group 1: country name = "CHINA"
Does means that I have used group_by() and do not use count() in group_by() again?