miss_cell: missing values Cell FUN

Description Usage Arguments Author(s) Examples

Description

For counting the number of missing values in each cell.

Usage

1
2
miss_cell(x, y, z, w, cell_ids, row_ids, col_ids, vnames, vars, n_min,
          pct = FALSE, digits = 0, prefix='', suffix='')

Arguments

x

The x variable

y

NOT USED

z

NOT USED

w

NOT USED (The number of missing will not be weighted!).

cell_ids

Index vector for selecting values in cell.

row_ids

NOT USED

col_ids

NOT USED

vnames

NOT USED

vars

NOT USED

n_min

NOT USED

pct

Logical asking whatever to draw absolute or relative frequency of missing values.

digits

Integer indicating the number of decimal places.

prefix

Free text added in each cell bevor results.

suffix

Free text added in each cell after results.

Author(s)

ADES <ades-s@web.de>

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
sex     <- factor(rbinom(1000, 1, 0.4),  labels=c('Men', 'Women'))
height  <- rnorm(1000, mean=1.66, sd=0.1)
height[which(sex=='Men')]<-height[which(sex=='Men')]+0.1
weight  <- rnorm(1000, mean=70, sd=5)
decades <- rbinom(1000, 3, 0.5)
decades <- factor(decades, labels=c('[35,45)','[45,55)','[55,65)','[65,75)'))
d<-data.frame(sex, decades, height, weight)
d$height[round(runif(250,1,1000))]<- NA
d$weight[round(runif(25 ,1,1000))]<- NA
tabular.ade(x_vars=c('height', 'weight'), xname=c('Height [m]','Weight [kg]'),
        cols=c('sex','decades','ALL'), cnames=c('Gender', 'Age decades'),
        data=d, FUN=miss_cell, prefix='Miss:')


Search within the etable package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.