multiPage: Setup a page

Description Usage Arguments Details Author(s) See Also Examples

View source: R/multiPage.R

Description

Create a full scrolling page.

Usage

1
multiPage(..., opts = list(), menu = NULL)

Arguments

...

any element.

opts

a list of options, see details.

menu

named vector of menu links.

Details

use the menu parameter on one "side" (multiLeft or multiRight) only; No need to specify it twice, it would breaks things as it is a CSS id, see examples.

Valid opts:

Author(s)

John Coene, [email protected]

See Also

https://github.com/alvarotrigo/multiscroll.js.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
if(interactive()){
# Run de demo
demo("muliPage", package = "fullPage")

# OR
library(shiny)

options <- list(
  sectionsColor = c("#4BBFC3", "#7BAABE", "#d3d3d3", "#000")
)

ui <- multiPage(
  opts = options,
  menu = c("Multi Scroll" = "multiscroll",
           "Plots" = "plots",
           "Full Section plots" = "fullplots",
           "Images" = "images"),
  multiLeft(
    align = "right",
    multiSection(
      menu = "multiscroll",
      h1("Multi")
    ),
    multiSection(
      menu = "plots",
      multiContainer(
        h1("Plot ->"),
        numericInput(
          "max",
          "Maximum",
          min = 50,
          max = 250,
          value = 10
        )
      )
    ),
    multiSectionPlot(
      menu = "fullplots",
      "fullPlot"
    ),
    multiSection(
      menu = "images",
      h1("Image ")
    )
  ),
  multiRight(
    align = "left",
    multiSection(
      h1("Page()")
    ),
    multiSection(
      plotOutput("plot")
    ),
    multiSection(
      multiContainer(
        h1("<- Full Section plot"),
        sliderInput(
          "number",
          "Data points",
          min = 50,
          max = 250,
          value = 10
        )
      )
    ),
    multiSectionImage(
      img = "https://alvarotrigo.com/multiScroll/imgs/tiger.jpg",
      side = "right",
      h1("Background")
    )
  )
)

server <- function(input, output){

  output$plot <- renderPlot({
    par(bg = "#7BAABE")
    hist(rnorm(100, 20, input$max))
  })

  output$fullPlot <- renderPlot({
    par(bg = "#d3d3d3")
    hist(rnorm(input$number, 20, 250))
  })
}

shinyApp(ui, server)
}

RinteRface/fullPage documentation built on May 3, 2019, 7:39 p.m.