See the code below:
library(dslabs) \sdata(gapminder)
gapminder percent > percent group by(year) percent > percent summarise(weight = nrow(population)) percent > percent filter(year percent in percent c(2010, 2015) &!is.na(population))
I keep getting the message, "Column weight is of unsupported type NULL," why?
Population is a vector inside the summarise() function, which is what nrow() expects as a parameter. I therefore wonder why it doesn't.
Note: I am not searching for workable substitutes for nrow() because I am aware of its alternatives in this situation. My query is philosophical and is focused on the word "Why."