R/shinypiecewise.R

Defines functions shinypiecewise

Documented in shinypiecewise

#' @title Dynamic plots using shiny with piecewise regression
#'
#'
#'
#' @description There are six widgets, two plots, and two tables.
#' The first plot is a 2d plot that plots a linear equation onto the spruce data based on the values of x knot 1 and x knot 2.
#' These values can be controlled by the first 2 widgets. The second plot is a 3d plot that plots r^2 values with respect to the
#' x knot 1 and x knot 2 values. The first widget changes the detail of the 3d plot. The next two widgets control the confidence
#' intervals of x knot 1 an x knot 2. The highest value of r^2 in the confidence intervals is plotted and the values of the x knots
#' that correspond to said r^2 value are placed in a table. The final table s a data frame of the spruce data that was used.
#'
#' @details Change values of widgets to determine the x knots that return the highest r^2 value.
#' @return  2 plots and two tables
#'
#' @section shiny:
#' The shiny web server will run once this function is invoked and will open a web browser. You should learn how this is implemented.
#'
#' The web server can be studied \url{https://shiny.rstudio.com/tutorial/}
#'
#' @section Shiny server:
#' When building the server function in the app make sure your remember the three steps:
#'
#' \enumerate{
#' \item Must populate the output list
#' \item Must use Render functions
#' \item Must use the input list
#' }
#'
#' @section Shiny reactivity:
#'
#' The main engine that drives \emph{shiny server} is the concept of \emph{reactivity} this is what makes shiny apps responsive.
#' The concept is a very important one and you must understand it completely by visiting a video and then reading an article.
#' \enumerate{
#' \item Please visit \href{https://vimeo.com/rstudioinc/review/131218530/212d8a5a7a/#t=47m27s}{Reactivity}
#' \item Read \href{https://shiny.rstudio.com/articles/reactivity-overview.html}{this informative article}
#' }
#'
#' @export
#'
#' @examples
#' \dontrun{ shinypiece()}
shinypiecewise<-function(){
  shiny::runApp(system.file("threeD_app", package="MATH4773CLAG"),launch.browser = TRUE)
}
cil0834/MATH4773CLAG documentation built on Sept. 26, 2020, 12:03 a.m.