Skip to contents

Calculate relative risk from a 2x2 table

Usage

rr(x, margin)

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