Calculate relative risk from a 2x2 table
rr.Rd
Calculate relative risk from a 2x2 table
Arguments
- x
Table
- margin
As in
prop.table()
Examples
m <- matrix(4:1, 2)
rr(m, 1)
#> [1] 0.8888889
rr(m, 2)
#> [1] 0.8571429
rr.Rd
Calculate relative risk from a 2x2 table
Table
As in prop.table()
m <- matrix(4:1, 2)
rr(m, 1)
#> [1] 0.8888889
rr(m, 2)
#> [1] 0.8571429