library(knitr) knitr::opts_chunk$set(fig.width=8, fig.height=4, dev = 'png', dpi = 150, fig.path='assets/figures/', echo=TRUE, warning=FALSE, message=FALSE, results = 'asis')
busulfansim
R package: r packageDescription('busulfansim', fields = 'Title')
r packageDescription('busulfansim', fields = 'Description')
pkgdown
: http://asancpt.github.io/busulfansim install.pacakges("devtools") devtools::install_github("asancpt/busulfansim") # Simply create single dose dataset busulfansim::bsfnPkparam(Weight = 20, Dose = 200, N = 20) # Simply create multiple dose dataset busulfansim::bsfnPkparamMulti(Weight = 20, Dose = 200, N = 20, Tau = 12)
library(busulfansim) MyDataset <- bsfnPkparam(Weight = 20, Dose = 200, N = 20) knitr::kable(head(MyDataset), format = 'markdown')
MyConcTime <- bsfnConcTime(Weight = 20, Dose = 200, N = 20) knitr::kable(head(MyConcTime), format = 'markdown')
bsfnPlot(MyConcTime)
cowplot
package is required#install.packages("cowplot") # if you don't have it library(cowplot) MyPlotPub <- lapply( c(seq(100, 800, by = 100)), function(x) bsfnPlotMulti(bsfnConcTime(20, x, 20)) + theme(legend.position="none") + labs(title = paste0("Single Dose ", x, "mg"))) plot_grid(MyPlotPub[[1]], MyPlotPub[[2]], MyPlotPub[[3]], MyPlotPub[[4]], MyPlotPub[[5]], MyPlotPub[[6]], MyPlotPub[[7]], MyPlotPub[[8]], labels=LETTERS[1:8], ncol = 2, nrow = 4)
MyDatasetMulti <- bsfnPkparamMulti(Weight = 20, Dose = 200, N = 20, Tau = 12) knitr::kable(head(MyDatasetMulti), format = 'markdown')
MyConcTimeMulti <- bsfnConcTimeMulti(Weight = 20, Dose = 200, N = 20, Tau = 12, Repeat = 10) knitr::kable(head(MyConcTimeMulti), format = 'markdown')
bsfnPlotMulti(MyConcTimeMulti)
cowplot
package is required#install.packages("cowplot") # if you don't have it library(cowplot) MyPlotMultiPub <- lapply( c(seq(4, 32, by = 4)), function(x) bsfnPlotMulti(bsfnConcTimeMulti(20, 250, 20, x, 15)) + theme(legend.position="none") + labs(title = paste0("q", x, "hr" ))) plot_grid(MyPlotMultiPub[[1]], MyPlotMultiPub[[2]], MyPlotMultiPub[[3]], MyPlotMultiPub[[4]], MyPlotMultiPub[[5]], MyPlotMultiPub[[6]], MyPlotMultiPub[[7]], MyPlotMultiPub[[8]], labels=LETTERS[1:8], ncol = 2, nrow = 4)
bsfnShiny()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.