R/superbShiny.R

Defines functions superbShiny

Documented in superbShiny

######################################################################################
#' @title User Interface to get summary plot of any statistics with adjusted error bars.
#'
#' @md
#'
#' @description The function ``suberbShiny()`` provides a simple user interface 
#'   to plot standard error or confidence interval for various descriptive 
#'   statistics under various designs, population size and purposes,
#'   according to the ``suberb`` framework. See \insertCite{cgh21}{superb} for more.
#'   Also see this \href{https://www.youtube.com/watch?v=rw_6ll5nVus/}{video} 
#'   from \insertCite{w21}{superb} for a demo using
#'   the shinyapps.io installation accessible at 
#'   \href{https://dcousin3.shinyapps.io/superbshiny/}{dcousin3.shinyapps.io/superbshiny}
#'   Limitations: it is not possible to use custom-made statistics with the 
#'   graphical user interface, nor is it possible to request an adjustment for cluster-
#'   randomized sampling. These options are available with ``superbPlot()``.
#'
#' @return A plot that can be cut-and-paste.
#'
#' @references
#' \insertAllCited{}
#'
#' @examples
#' # Launch the user interface: 
#' \donttest{
#' if (interactive())
#'    superbShiny() 
#' }
#'
#' @export superbShiny
#' @importFrom stringr str_remove_all
#' @importFrom stringr str_replace_all
#' @importFrom foreign read.spss
#' @import ggplot2
#' @import shiny
#' @import shinyBS
#
######################################################################################



superbShiny <- function() {
    dir <- system.file("superbShiny", package="superb")
    options(shiny.launch.browser = TRUE) 
    shiny::runApp(dir)
}

Try the superb package in your browser

Any scripts or data that you put into this service are public.

superb documentation built on Jan. 23, 2023, 5:44 p.m.