compress: Compress an object of class mytable or cbind.mytable

Description Usage Arguments Methods (by class) Examples

View source: R/compressMytable.R

Description

Compress an object of class mytable or cbind.mytable

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
compress(x, no = 2, add.label = TRUE)

## S3 method for class 'mytable'
compress(x, no = 2, add.label = TRUE)

## S3 method for class 'cbind.mytable'
compress(x, no = 2, add.label = TRUE)

## S3 method for class 'data.frame'
compress(x, no = 2, add.label = TRUE)

Arguments

x

An object of class mytable or cbind.mytable

no

Representative group of two groups

add.label

Logical. Whether or not add representative group name

Methods (by class)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
require(stringr)
require(magrittr)
mytable(acs) %>% compress
mytable(Dx~.,data=acs) %>% compress
## Not run: 
require(ztable)
mytable(Dx~.,data=acs) %>% compress %>% ztable
mytable(Dx+sex~.,data=acs) %>% compress

## End(Not run)

moonBook documentation built on Jan. 13, 2021, 6:43 a.m.