represent_categorical_data_forsubgroups: Function to find the number and percentages of categories

View source: R/IPDFilecheck.R

represent_categorical_data_forsubgroupsR Documentation

Function to find the number and percentages of categories

Description

Function to find the number and percentages of categories

Usage

represent_categorical_data_forsubgroups(
  data,
  variable1,
  variable2,
  nrcode = NA
)

Arguments

data,

a data frame

variable1

the column name of the variable to be grouped based on

variable2

the column name of the variable to represented

nrcode

non response code for the variable2

Value

the subgroup

Examples

this.df <- data.frame(c(11, 78,22), c("m", "f", "f"), c(1,2,2),
stringsAsFactors = FALSE)
colnames(this.df) <- c("mark", "gender", "group")
represent_categorical_data_forsubgroups(this.df, "group", "gender", NA)

sheejamk/IPDFileCheck documentation built on March 10, 2024, 3:14 p.m.