worstplaces: Places with worst RR

View source: R/worstplaces.R

worstplacesR Documentation

Places with worst RR

Description

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

Usage

worstplaces(rrs, d = "pctlowinc", e = "pm", n = 10, digits = 2)

Arguments

rrs

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

d

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]

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)
  worstplaces(RRS.US)

## End(Not run)

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