knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
The goal of the AUCtrap
package is to provide utilities for calculating the area under the curve for longitudinal measurements.
You can install the development version of AUCtrap from GitHub with:
# install.packages("devtools") devtools::install_github("anikoszabo/AUCtrap")
This is a basic example which shows you how to solve a common problem:
library(AUCtrap) AUCtrap(0:3, c(3,4,1,2)) AUCtrap(0:3, c(3,4,1,2), method="iAUC") AUCtrap(0:3, c(3,4,1,2), method="minAUC")
A formula can be used:
dd <- data.frame(Time = 0:4, Value = c(3,4,1,2,10)) AUCtrap(Value ~ Time, data=dd) ex2 <- AUCtrap(0:3, c(3,4,1,2), method="iAUC") ex2 plot(ex2) ex.min <- AUCtrap(0:3, c(3,4,1,2), method="minAUC") plot(ex.min) AUCtrap(Value ~ Time, data=dd, subset=Time < 4, method="minAUC")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.