Title: | Create Mini Map for Web Pages |
---|---|
Description: | Quickly and easily add a mini map to your 'rmarkdown' html documents. |
Authors: | Wei Su [aut, cre] , Lars Jung [aut, cph] (pagemap library in htmlwidgets/lib, https://github.com/lrsjng/pagemap) |
Maintainer: | Wei Su <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.1.3 |
Built: | 2024-11-13 03:28:39 UTC |
Source: | https://github.com/swsoyee/pagemapr |
Create mini map for single web page.
pagemap(id, box_style = list(), ..., elementId = NULL)
pagemap(id, box_style = list(), ..., elementId = NULL)
id |
|
box_style |
a |
... |
additional options passed to |
elementId |
|
library(pagemap) # Most basic usage pagemap() # Fix it’s position on the screen pagemap( id = "mini_map", box_style = list(left = "5px", top = "10px") ) # Style by providing a list of css property pagemap( id = "mini_map", styles = list( "h1,h2,a,code" = "rgba(0, 0, 0, 0.10)", "img" = "rgba(0, 0, 0, 0.08)", "pre" = "rgba(0, 0, 0, 0.04)" ) )
library(pagemap) # Most basic usage pagemap() # Fix it’s position on the screen pagemap( id = "mini_map", box_style = list(left = "5px", top = "10px") ) # Style by providing a list of css property pagemap( id = "mini_map", styles = list( "h1,h2,a,code" = "rgba(0, 0, 0, 0.10)", "img" = "rgba(0, 0, 0, 0.08)", "pre" = "rgba(0, 0, 0, 0.04)" ) )
Output and render functions for using pagemap within Shiny applications and interactive Rmd documents.
pagemapOutput(outputId, width = "100%", height = "auto") renderPagemap(expr, env = parent.frame(), quoted = FALSE)
pagemapOutput(outputId, width = "100%", height = "auto") renderPagemap(expr, env = parent.frame(), quoted = FALSE)
outputId |
output variable to read from. |
width , height
|
Fixed width for pagemap (in css units). Ignored when used in a Shiny app. It is not recommended to use this parameter because the widget knows how to adjust its width automatically. |
expr |
An expression that generates a pagemap |
env |
The environment in which to evaluate |
quoted |
Is |
library(shiny) ## Only run this example in interactive R sessions if (interactive()) { shinyApp( ui = fluidPage(pagemapOutput("pagemap")), server = function(input, output) { output$pagemap <- renderPagemap(pagemap()) } ) }
library(shiny) ## Only run this example in interactive R sessions if (interactive()) { shinyApp( ui = fluidPage(pagemapOutput("pagemap")), server = function(input, output) { output$pagemap <- renderPagemap(pagemap()) } ) }