library(nycflights13)
library(dplyr)
sum.na <- function(df,x){df %>% summarise(n=sum(is.na(x)))}
sum.na(flights, arr_time)
When I run the above code, I get the error below:
**Error in eval(cols[[col]], .data, parent.frame()) :
object 'arr_time' not found**
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…