The ctru includes a Shiny application that is a front-end for a number of sample-size packages (most of which are detailed in the Clincial Trials CRAN TaskView). It provides a simple WebUI (Web-based User Interface) method for performing sample size calculations for a range of study designs as implemented in the various packages.
This document details usage of the Shiny app as it stands and how to go about extending it to include more packages and functions.
You need to install and load the ctru package on your computer.
library(devtools) install_github("ns-ctru/ctru") library(ctru)
You can now run the application on your computer by running the included function with the sample_size
argument...
library(ctru) ctru::ctru_shiny(example = "sample_size")
A new tab in your default web-browser will open with the Shiny application running. If you receive any error messages about packages not being available please take the time to submit a pull-request to include the package in the dependencies listed in the DESCRIPTION
file.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.