table_unga: A function for cross tabulation.

Description Usage Arguments Value References Examples

View source: R/table_unga.R

Description

Produces multiple prop.tables of a data frame. Extract questions with a specified number of response alternatives.

Usage

1
table_unga(qalt, sumopt, expvar, x)

Arguments

qalt

Number of response alternatives in a survey question

sumopt

Options for summation of proportions questions with 5 or 6 response alternatives, argument can be 1 or 2

expvar

Explanatory variable in your data frame, use numeric values

x

is a data frame

Value

the output from print

References

Norman M. Bradburn et al. 2004. Asking questions. 2nd revised edition. John Wiley & Sons

Examples

1
2
3
4
5
6
7
set.seed(123456)
gender<-round(runif(50,1,2))
variable_1<-round(runif(50,1,5))
variable_2<-round(runif(50,1,5))
variable_3<-round(runif(50,1,5))
df<-data.frame(gender,variable_1,variable_2,variable_3)
table_unga(5,1,gender,df)

unga documentation built on Aug. 31, 2020, 5:07 p.m.