See the code below:
library(dslabs)
data(gapminder)
differenceminder percent > percent
filter(year% in% c(2010, 2015) &!is.na(population))%%%%%%%%%%%%%%%%%%%%%%%%%%%%
percent > group by(year) percent
weight = nrow(population) in the summary
I keep getting the message, "Column weight is of unsupported type NULL," why?
Population is a vector inside the summarise() function, and nrow() accepts a vector 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."