View source: R/compressMytable.R
| compress | R Documentation |
Compress an object of class mytable or cbind.mytable
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)
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 |
compress(mytable): S3 method for class mytable
compress(cbind.mytable): S3 method for class cbind.mytable
compress(data.frame): S3 method for class data.frame
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.