-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathREADME.Rmd
56 lines (39 loc) · 1.52 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# tidyrates
<!-- badges: start -->
[](https://lifecycle.r-lib.org/articles/stages.html#experimental)
[](https://CRAN.R-project.org/package=tidyrates)
[](https://github.com/rfsaldanha/tidyrates/actions/workflows/R-CMD-check.yaml)
<!-- badges: end -->
The goal of tidyrates is to compute adjusted rates and other epidemiological indicators in a tidy way, wrapping functions from the `epitools` package.
## Installation
You can install the release version of tidyrates from CRAN:
```{r eval=FALSE}
install.packages("tidyrates")
```
Or the development version from [GitHub](https://github.com/rfsaldanha/tidyrates):
```{r eval=FALSE}
# install.packages("remotes")
remotes::install_github("rfsaldanha/tidyrates")
```
## Example
```{r example}
library(tidyrates)
head(fleiss_data)
standard_pop <- tibble::tibble(
age_group = c("Under 20", "20-24", "25-29", "30-34", "35-39", "40 and over"),
population = c(63986.6, 186263.6, 157302.2, 97647.0, 47572.6, 12262.6)
)
rate_adj_direct(fleiss_data, .std = standard_pop, .keys = "key")
```