getting count of missing values in summary

92 Views Asked by At

i want to get the count of NA's in column with max and min. is there any way in expss already to get a count in below example

library(expss)
library(dplyr)

example <- data.frame(org = c("A", "B", "C", "D", "E", "F", "G"),
                      q1 = c("apple", "apple", NA, "apple", "apple", "apple", NA),
                      q2 = c(NA, NA, NA, "banana", "banana", "banana", NA),
                      q3 = c("orange", NA, "orange", "orange", NA, "orange", NA),
                      region = c("1", "1", "2", "3", "3", "2", "2"))

pct_all <- cross_cpct(example, mrset(q1 %to% q3), region)
0

There are 0 best solutions below