rowPerc: Row Percents

Description Usage Arguments Value Author(s) Examples

View source: R/rowPerc.R

Description

Computes row percentages for a given two-way table.

Usage

1
rowPerc(tab)

Arguments

tab

A table, e.g., the result of xtabs(~var1+var2,data=DataFrame).

Value

An object of class table, giving row percentages for the input table.

Author(s)

Homer White hwhite0@georgetowncollege.edu

Examples

1
2
3
data(ledgejump)
MyTable <- xtabs(~weather+crowd.behavior,data=ledgejump)
rowPerc(MyTable)

Example output

Loading required package: abd
Loading required package: nlme
Loading required package: lattice
Loading required package: grid
Loading required package: mosaic
Loading required package: dplyr

Attaching package: 'dplyr'

The following object is masked from 'package:nlme':

    collapse

The following objects are masked from 'package:stats':

    filter, lag

The following objects are masked from 'package:base':

    intersect, setdiff, setequal, union

Loading required package: ggformula
Loading required package: ggplot2
Loading required package: ggstance

Attaching package: 'ggstance'

The following objects are masked from 'package:ggplot2':

    GeomErrorbarh, geom_errorbarh


New to ggformula?  Try the tutorials: 
	learnr::run_tutorial("introduction", package = "ggformula")
	learnr::run_tutorial("refining", package = "ggformula")
Loading required package: mosaicData
Loading required package: Matrix

The 'mosaic' package masks several functions from core packages in order to add 
additional features.  The original behavior of these functions should not be affected by this.

Note: If you use the Matrix package, be sure to load it BEFORE loading mosaic.

Attaching package: 'mosaic'

The following object is masked from 'package:Matrix':

    mean

The following object is masked from 'package:ggplot2':

    stat

The following objects are masked from 'package:dplyr':

    count, do, tally

The following objects are masked from 'package:stats':

    IQR, binom.test, cor, cor.test, cov, fivenum, median, prop.test,
    quantile, sd, t.test, var

The following objects are masked from 'package:base':

    max, mean, min, prod, range, sample, sum

Welcome to tigerstats!
To learn more about this package, consult its website:
	http://homerhanumat.github.io/tigerstats
       crowd.behavior
weather baiting polite  Total
   cool   22.22  77.78 100.00
   warm   66.67  33.33 100.00

tigerstats documentation built on July 2, 2020, 2:32 a.m.