add.count: Add Count

add.countR Documentation

Add Count

Description

Typically used after group_by(). This function gets the counts for each group and adds it back to the ungrouped dataset.

Usage

add.count(df, rename = "N")

Arguments

df

data.frame object

rename

Specify to rename column for counts

Value

data.frame object

Examples

library(tidyverse)
mtcars%>%
  group_by(am) %>%
  add.count()


dennisteowh/dthelper documentation built on March 19, 2022, 11:42 a.m.