R/P2M2AppsFunctions.R

Defines functions TargetedApp hello

Documented in hello

# Hello, world!
#
# This is an example function named 'hello'
# which prints 'Hello, world!'.
#
# You can learn more about package authoring with RStudio at:
#
#   http://r-pkgs.had.co.nz/
#
# Some useful keyboard shortcuts for package authoring:
#
#   Build and Reload Package:  'Ctrl + Shift + B'
#   Check Package:             'Ctrl + Shift + E'
#   Test Package:              'Ctrl + Shift + T'

hello <- function() {
  print("Hello, world!")
}


#' TargetedApp
#'
#' This function run the shiny application
#' @usage TargetedApp()
#' TargetedApp()
#' @export
TargetedApp <- function() {
  appDir <- system.file("ShinyApps", "TargetedApp", package = "P2M2Apps")
  if (appDir == "") {
    stop("Could not find example directory. Try re-installing `mypackage`.", call. = FALSE)
  }
  shiny::runApp(appDir, display.mode = "normal")
}
Mystilivia/P2M2Apps documentation built on May 7, 2019, 5:16 p.m.