worstd: Demographic groups with worst RR

View source: R/worstd.R

worstdR Documentation

Demographic groups with worst RR

Description

View one key part of table of Relative Risk results by zone by group by envt risk factor

Usage

worstd(rrs, d = "pctlowinc", e = "pm", zone = "USA", n = 10, digits = 2)

Arguments

rrs

Required. This has to be the output of one of the functions like RR.table()

d

not used. name of demographic field with percent (fraction) of population that is in each given demographic group, in dimnames(rrs)[1]

e

name of environmental risk factor in dimnames(rrs)[2]

zone

name of zone such as 'USA' or 'NY' found in dimnames(rrs)[3]

n

worst 10 by default

digits

round to 2 by default

Value

matrix

See Also

RR()

Examples

## Not run: 
  data(bgtest, package = 'ejanalysis')
  RRS.US  <- RR.table(mydat = bgtest, Enames = names.e, Dnames = names.d, popcolname = 'pop')
  RRS.ST  <- RR.table(mydat = bgtest, Enames = names.e, Dnames = names.d, popcolname = 'pop',
                  Zcolname = 'ST')
  RRS <- RR.table.add(RRS.ST, RRS.US)
  worstd(RRS.US)

## End(Not run)

ejanalysis/ejanalysis documentation built on April 2, 2024, 10:12 a.m.