Last chance! 50% off unlimited learning
Sale ends in
tally(x, ...) ## S3 method for class 'ANY':
tally(x, ...)
## S3 method for class 'formula':
tally( x, data=parent.frame(),
format=c('default','count','proportion','percent'),
margins=TRUE, quiet=TRUE, subset, ...)
'default'
,
'count'
, 'proportion'
, or 'percent'
.
In case of 'default'
, counts are used unless there
is a condidata
addmargins
.tally( ~ substance, HELPrct)
tally( ~ substance & sex , HELPrct)
tally( sex ~ substance, HELPrct) # equivalent to tally( ~ sex | substance, ... )
tally( ~ substance | sex , HELPrct)
tally( ~ substance | sex , HELPrct, format='count')
tally( ~ substance & sex , HELPrct, format='percent')
Run the code above in your browser using DataLab