Learn R Programming

unga (version 0.1.0)

table_non_resp: A function that return proportion of missing values in a data frame

Description

A function that return proportion of missing values in a data frame

Usage

table_non_resp(x)

Arguments

x

data frame

Value

the output from return

References

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

Examples

Run this code
# NOT RUN {
set.seed(123456)
gender<-round(runif(50,1,2))
variable_1<-sample(c(1,2,3,4,5,6,NA),50,replace = TRUE)
variable_2<-sample(c(1,2,3,4,5,6,NA),50,replace = TRUE)
variable_3<-sample(c(1,2,3,4,5,6,NA),50,replace = TRUE)
df<-data.frame(gender,variable_1,variable_2,variable_3)
table_non_resp(df)

# }

Run the code above in your browser using DataLab