Skip to content

Commit

Permalink
Remove shinyUI() and shinyServer() from examples
Browse files Browse the repository at this point in the history
  • Loading branch information
wch committed Apr 5, 2016
1 parent 0bdc8f0 commit 5d6d75b
Show file tree
Hide file tree
Showing 54 changed files with 154 additions and 154 deletions.
20 changes: 10 additions & 10 deletions R/bootstrap-layout.R
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#' @seealso \code{\link{column}}, \code{\link{sidebarLayout}}
#'
#' @examples
#' shinyUI(fluidPage(
#' fluidPage(
#'
#' # Application title
#' titlePanel("Hello Shiny!"),
Expand All @@ -52,9 +52,9 @@
#' plotOutput("distPlot")
#' )
#' )
#' ))
#' )
#'
#' shinyUI(fluidPage(
#' fluidPage(
#' title = "Hello Shiny!",
#' fluidRow(
#' column(width = 4,
Expand All @@ -64,7 +64,7 @@
#' "3 offset 2"
#' )
#' )
#' ))
#' )
#'
#' @rdname fluidPage
#' @export
Expand Down Expand Up @@ -115,7 +115,7 @@ fluidRow <- function(...) {
#' @seealso \code{\link{column}}
#'
#' @examples
#' shinyUI(fixedPage(
#' fixedPage(
#' title = "Hello, Shiny!",
#' fixedRow(
#' column(width = 4,
Expand All @@ -125,7 +125,7 @@ fluidRow <- function(...) {
#' "3 offset 2"
#' )
#' )
#' ))
#' )
#'
#' @rdname fixedPage
#' @export
Expand Down Expand Up @@ -227,7 +227,7 @@ titlePanel <- function(title, windowTitle=title) {
#'
#' @examples
#' # Define UI
#' shinyUI(fluidPage(
#' fluidPage(
#'
#' # Application title
#' titlePanel("Hello Shiny!"),
Expand All @@ -248,7 +248,7 @@ titlePanel <- function(title, windowTitle=title) {
#' plotOutput("distPlot")
#' )
#' )
#' ))
#' )
#'
#' @export
sidebarLayout <- function(sidebarPanel,
Expand Down Expand Up @@ -286,13 +286,13 @@ sidebarLayout <- function(sidebarPanel,
#' @seealso \code{\link{fluidPage}}, \code{\link{flowLayout}}
#'
#' @examples
#' shinyUI(fluidPage(
#' fluidPage(
#' verticalLayout(
#' a(href="http://example.com/link1", "Link One"),
#' a(href="http://example.com/link2", "Link Two"),
#' a(href="http://example.com/link3", "Link Three")
#' )
#' ))
#' )
#' @export
verticalLayout <- function(..., fluid = TRUE) {
lapply(list(...), function(row) {
Expand Down
20 changes: 10 additions & 10 deletions R/bootstrap.R
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ collapseSizes <- function(padding) {
#'
#' @examples
#' # Define UI
#' shinyUI(pageWithSidebar(
#' pageWithSidebar(
#'
#' # Application title
#' headerPanel("Hello Shiny!"),
Expand All @@ -214,7 +214,7 @@ collapseSizes <- function(padding) {
#' mainPanel(
#' plotOutput("distPlot")
#' )
#' ))
#' )
#'
#' @export
pageWithSidebar <- function(headerPanel,
Expand Down Expand Up @@ -291,21 +291,21 @@ pageWithSidebar <- function(headerPanel,
#' \code{\link{updateNavbarPage}}
#'
#' @examples
#' shinyUI(navbarPage("App Title",
#' navbarPage("App Title",
#' tabPanel("Plot"),
#' tabPanel("Summary"),
#' tabPanel("Table")
#' ))
#' )
#'
#' shinyUI(navbarPage("App Title",
#' navbarPage("App Title",
#' tabPanel("Plot"),
#' navbarMenu("More",
#' tabPanel("Summary"),
#' "----",
#' "Section header",
#' tabPanel("Table")
#' )
#' ))
#' )
#' @export
navbarPage <- function(title,
...,
Expand Down Expand Up @@ -679,7 +679,7 @@ tabsetPanel <- function(...,
#'
#' @seealso \code{\link{tabPanel}}, \code{\link{updateNavlistPanel}}
#' @examples
#' shinyUI(fluidPage(
#' fluidPage(
#'
#' titlePanel("Application Title"),
#'
Expand All @@ -689,7 +689,7 @@ tabsetPanel <- function(...,
#' tabPanel("Second"),
#' tabPanel("Third")
#' )
#' ))
#' )
#' @export
navlistPanel <- function(...,
id = NULL,
Expand Down Expand Up @@ -1493,11 +1493,11 @@ downloadLink <- function(outputId, label="Download", class=NULL) {
#' # add an icon to a submit button
#' submitButton("Update View", icon = icon("refresh"))
#'
#' shinyUI(navbarPage("App Title",
#' navbarPage("App Title",
#' tabPanel("Plot", icon = icon("bar-chart-o")),
#' tabPanel("Summary", icon = icon("list-alt")),
#' tabPanel("Table", icon = icon("table"))
#' ))
#' )
#'
#' @export
icon <- function(name, class = NULL, lib = "font-awesome") {
Expand Down
8 changes: 4 additions & 4 deletions R/progress.R
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
#' @examples
#' \dontrun{
#' # server.R
#' shinyServer(function(input, output, session) {
#' function(input, output, session) {
#' output$plot <- renderPlot({
#' progress <- shiny::Progress$new(session, min=1, max=15)
#' on.exit(progress$close())
Expand All @@ -71,7 +71,7 @@
#' }
#' plot(cars)
#' })
#' })
#' }
#' }
#' @seealso \code{\link{withProgress}}
#' @format NULL
Expand Down Expand Up @@ -206,7 +206,7 @@ Progress <- R6Class(
#' @examples
#' \dontrun{
#' # server.R
#' shinyServer(function(input, output) {
#' function(input, output) {
#' output$plot <- renderPlot({
#' withProgress(message = 'Calculation in progress',
#' detail = 'This may take a while...', value = 0, {
Expand All @@ -217,7 +217,7 @@ Progress <- R6Class(
#' })
#' plot(cars)
#' })
#' })
#' }
#' }
#' @seealso \code{\link{Progress}}
#' @rdname withProgress
Expand Down
16 changes: 8 additions & 8 deletions R/reactives.R
Original file line number Diff line number Diff line change
Expand Up @@ -932,7 +932,7 @@ setAutoflush <- local({
#'
#' @examples
#' \dontrun{
#' shinyServer(function(input, output, session) {
#' function(input, output, session) {
#'
#' # Anything that calls autoInvalidate will automatically invalidate
#' # every 2 seconds.
Expand All @@ -955,7 +955,7 @@ setAutoflush <- local({
#' autoInvalidate()
#' hist(isolate(input$n))
#' })
#' })
#' }
#' }
#'
#' @export
Expand Down Expand Up @@ -1010,7 +1010,7 @@ reactiveTimer <- function(intervalMs=1000, session = getDefaultReactiveDomain())
#'
#' @examples
#' \dontrun{
#' shinyServer(function(input, output, session) {
#' function(input, output, session) {
#'
#' observe({
#' # Re-execute this reactive expression after 1000 milliseconds
Expand All @@ -1029,7 +1029,7 @@ reactiveTimer <- function(intervalMs=1000, session = getDefaultReactiveDomain())
#' invalidateLater(2000)
#' hist(isolate(input$n))
#' })
#' })
#' }
#' }
#'
#' @export
Expand Down Expand Up @@ -1103,12 +1103,12 @@ coerceToFunc <- function(x) {
#' @examples
#' \dontrun{
#' # Assume the existence of readTimestamp and readValue functions
#' shinyServer(function(input, output, session) {
#' function(input, output, session) {
#' data <- reactivePoll(1000, session, readTimestamp, readValue)
#' output$dataTable <- renderTable({
#' data()
#' })
#' })
#' }
#' }
#'
#' @export
Expand Down Expand Up @@ -1170,7 +1170,7 @@ reactivePoll <- function(intervalMillis, session, checkFunc, valueFunc) {
#' @examples
#' \dontrun{
#' # Per-session reactive file reader
#' shinyServer(function(input, output, session)) {
#' function(input, output, session) {
#' fileData <- reactiveFileReader(1000, session, 'data.csv', read.csv)
#'
#' output$data <- renderTable({
Expand All @@ -1182,7 +1182,7 @@ reactivePoll <- function(intervalMillis, session, checkFunc, valueFunc) {
#' # the same reader, so read.csv only gets executed once no matter how many
#' # user sessions are connected.
#' fileData <- reactiveFileReader(1000, session, 'data.csv', read.csv)
#' shinyServer(function(input, output, session)) {
#' function(input, output, session) {
#' output$data <- renderTable({
#' fileData()
#' })
Expand Down
4 changes: 2 additions & 2 deletions R/shinywrappers.R
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ as.tags.shiny.render.function <- function(x, ..., inline = FALSE) {
#' @examples
#' \dontrun{
#'
#' shinyServer(function(input, output, clientData) {
#' function(input, output, clientData) {
#'
#' # A plot of fixed size
#' output$plot1 <- renderImage({
Expand Down Expand Up @@ -181,7 +181,7 @@ as.tags.shiny.render.function <- function(x, ..., inline = FALSE) {
#' # Return a list containing the filename
#' list(src = filename)
#' }, deleteFile = FALSE)
#' })
#' }
#'
#' }
renderImage <- function(expr, env=parent.frame(), quoted=FALSE,
Expand Down
Loading

0 comments on commit 5d6d75b

Please sign in to comment.