Count function, beginners question, Tidy Data

Hi community,

in Hadley Wickham's paper "Tidy Data":

there is a line of code on page 16:

hod2 <- count(deaths, c("hod", "cod"))

'hod2' is a variable that gets assigned the result of the 'count' function. 'deaths' seems to be a dataset. 'hod' and "cod' are two variables or columns in the 'deaths' dataset.

Why is the author creating a vector with the c() function, containing 'hod' and 'cod' in the count-function? Sorry, but I cannot figure it out, not even using a web search engine.

Thank you :wink:

That paper is very, very old and the syntax has long since been overhauled.

The present syntax would be:

hod2 <- count(deaths, hod, cod)

Thank you! I will just ignore the outdated syntax.

This topic was automatically closed 42 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.