Skip to content

Commit

Permalink
example usage in README
Browse files Browse the repository at this point in the history
  • Loading branch information
eebrown committed Sep 25, 2019
1 parent 1009085 commit 307e23f
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,21 @@ This package is in production and not yet suitable for production use. We welcom

The development version of this package can be installed via the command: `devtools::install_github("eebrown/chlorpromazineR")`.

## Usage

Once installed, load package with `library(chlorpromazineR)`. The package's main conversion functions are documented and usage and examples can be seen with `help(to_cpz)` and `help(to_ap)`.

### Convert data to chlorpromazine equivalents

participant_ID <- c("P01", "P02", "P03", "P04")
age <- c(42, 29, 30, 60) # not used in calculation
antipsychotic <- c("olanzapine", "olanzapine", "quetiapine", "ziprasidone")
dose <- c(10, 12.5, 300, 60)
example_oral <- data.frame(participant_ID, age, antipsychotic, dose,
stringsAsFactors = FALSE)
to_cpz(example_oral, ap_label = "antipsychotic", dose_label = "dose",
route = "oral")

## Disclaimer

This package is not for clinical use. The authors assume no liability. All work must be verified independently. Use at own risk.
Expand Down

0 comments on commit 307e23f

Please sign in to comment.