SummarizeVariable: Summarizes a numeric or categorical variable for plotting

View source: R/SummarizeVariable.R

SummarizeVariableR Documentation

Summarizes a numeric or categorical variable for plotting

Description

Summarizes a numeric or categorical variable for plotting

Usage

SummarizeVariable(
  x,
  type = c("Average", "Sum", "Percentage")[1],
  weights = NULL,
  subset = NULL,
  category = NULL
)

Arguments

x

The input variable to summarize

type

The type of summary statistic to output. This should be one of 'Average', 'Sum', 'Most frequent' or 'Percentage'.

weights

Sampling or replication weights. This is a numeric vector of the same length as x.

subset

Option logical vector of the same length as x indicating whether or not to include an observation in x.

category

A comma-seperated list of the name or indices of the categories to include for 'Percentage'.


NumbersInternational/flipPictographs documentation built on Feb. 26, 2024, 5:38 a.m.