plot_rates: Plot the data in the incidence database

Description Usage Arguments Value Examples

Description

Plot the data in the incidence database

Usage

1
plot_rates(x, y, psize = NULL, group = NULL)

Arguments

x

Probably age group indicator (must be numeric)

y

Probably age-specific rates (per 100,000)

psize

Variable to scale point size

group

Variable indicating groups to plot using different colors

Value

ggplot

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# Plot incidence
data(incratesf)
plot_rates(incratesf$Age, incratesf$Female.Rate.Per.100K,
        psize=incratesf$Cases, group=paste(incratesf$Country,
                                           incratesf$Year))

# Plot mortality
data(allmortratesf)
df <- subset(allmortratesf, 
                  Country=='United States' | Country=='Uganda')
plot_rates(df$Age, df$Rate.Per.100K, psize=NULL, group=df$Country)

cancerpolicy/bcimodel documentation built on June 30, 2019, 12:39 a.m.