Hey all,
So I'm working working with a package called nycflights13, and working in flights data set. There is a variable called air_time that has a corresponding column of data, and empty entries are cancelled flights, which are NA's. There is another column called month which is 1-12 for the which month it is.
What I want to do is find out which month has the most cancelled flights, ie which month has the most NA's.
This is what I have tried so far:
x <- select(flights, air_time)
colSums(is.na(x))
That returns a sum of 9430 but I don't know how to get the sums that correspond to specific values of the month column.