et: Tables variables

View source: R/et.r

etR Documentation

Tables variables

Description

Creates a table for a variable, mimicking count() from 'dplyr'. ET stands for exploratory table or easy table.

Usage

et(data_frame, variable_name)

Arguments

data_frame

the data.frame

variable_name

the variable name

Value

a data frame

Examples

# load data
data(nhanes)

# define country
nhanes<-nhanes |> transform(
  country=base_match(dmdborn4,'USA'=1,'Other'=2)
)

# examine variable, with native piping
nhanes |> et(country)

# examine variable, with dollar-sign notation
et(nhanes$country)

baseverse documentation built on April 29, 2026, 1:08 a.m.