crplyr (version 0.3.8)

unweighted_n: Return the unweighted counts from summarize

Description

This function allows you to return the unweighted counts from a Crunch dataset or grouped crunch dataset. It can only be used from within a summarise() call. If your dataset is unweighted, then unweighted_n() is equivalent to n().

Usage

unweighted_n()

Arguments

Examples

Run this code
# NOT RUN {
ds %>%
   group_by(cyl) %>%
   summarize(
       raw_counts = unweighted_n(),
       mean = mean(wt)
   )
# }

Run the code above in your browser using DataLab