IPDFileCheck (version 0.5.0)

representCategoricalDataText: Function to represent categorical data in the form - numbers (percentage)

Description

Function to represent categorical data in the form - numbers (percentage)

Usage

representCategoricalDataText(data, variable, nrcode)

Arguments

data

data frame

variable

column name

nrcode

non response code

Value

the numbers (percentage) , -1 for failure

Examples

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

Run the code above in your browser using DataCamp Workspace