IPDFileCheck (version 0.5.0)

representCategoricalData: Function to find the number and percentages of categories

Description

Function to find the number and percentages of categories

Usage

representCategoricalData(data, variable, nrcode = NA)

Arguments

data,

a data frame

variable

the column name

nrcode

non response code

Value

number and percentages or -1 if failure

Examples

Run this code
# NOT RUN {
representCategoricalData(data.frame(mark=c(0,11,78,160),gender=c("f","m","f","m")),"gender",NA)
# }

Run the code above in your browser using DataLab