pagePiling: Setup a page.

Description Usage Arguments Details Author(s) See Also Examples

View source: R/pagePiling.R

Description

Create a full scrolling page.

Usage

1
2
pagePiling(..., sections.color, opts = list(), menu = NULL,
  center = FALSE)

Arguments

...

any element.

sections.color

character vector, i.e.: c("blue", "red")

opts

list of options, see details.

menu

menu links as named vector.

center

horizontally center all sections.

Details

Author(s)

John Coene, [email protected]

See Also

https://github.com/alvarotrigo/pagePiling.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
if(interactive()){
# Run de demo
demo("pagePiling", package = "fullPage")

# Or
library(shiny)

options <- list(
  loopBottom = TRUE
)

ui <- pagePiling(
  center = TRUE,
  sections.color = c('#f2f2f2', '#2C3E50', '#39C'),
  opts = options,
  menu = c("Section 1" = "section1",
           "Piling" = "section2",
           "Plots" = "section3",
           "Reactive" = "section4",
           "Images" = "images"),
  pageSection(
    menu = "section1",
    h1("Page piling")
  ),
  pageSection(
    menu = "section2",
    h1("Section 2")
  ),
  pageSectionPlot(
    "plot",
    menu = "section3",
    h1("Plot background")
  ),
  pageSectionPlot(
    "plot2",
    menu = "section4",
    pageContainer(
      h1("Reactive background"),
      sliderInput(
        "bins",
        "Data Points",
        min = 100,
        max = 500,
        step = 25,
        value = 200
      )
    )
  ),
  pageSectionImage( # will not show in viewer, open in browser
    menu = "image",
    img = paste0(
      "https://raw.githubusercontent.com/alvarotrigo/",
      "fullPage.js/master/examples/imgs/bg2.jpg"),
    h1("Image background")
  )
)

server <- function(input, output){

  output$plot <- renderPlot({
    par(bg = "grey60")
    plot(mtcars$wt, mtcars$mpg)
  })

  output$plot2 <- renderPlot({
    par(bg = "grey80")
    hist(rnorm(input$bins, 100, 250))
  })
}

shinyApp(ui, server)
}

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