cohorts | R Documentation |
Transform Year | Age | Value
table into cohort format, and possibly
create a plot.
cohorts(x, xtab = TRUE, plot = TRUE, log = "", base = exp(1),
type = "l", lty = 1, xlab = "Age", ylab = "Value", ...)
x |
a |
xtab |
whether the output should be returned as a wide crosstab table (otherwise long data frame). |
plot |
whether a cohort plot should be created. |
log |
a string specifying which axes should be log-transformed:
|
base |
the log base used if |
type |
passed to |
lty |
passed to |
xlab |
passed to |
ylab |
passed to |
... |
passed to |
Crosstab table in cohort format, of class c("xtabs","table")
.
Zero values are treated as NA
.
If x
is a three column data frame, column 1 must contain the year,
column 2 the age, and column 3 the value. If x
is crosstabbed, rows
must be years and columns must be age.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.