Type: | Package |
Title: | Create Mini Map for Web Pages |
Version: | 0.1.3 |
Date: | 2021-08-28 |
Maintainer: | Wei Su <swsoyee@gmail.com> |
Description: | Quickly and easily add a mini map to your 'rmarkdown' html documents. |
Imports: | htmlwidgets |
Suggests: | knitr, shiny, rmarkdown, devtools |
License: | MIT + file LICENSE |
Encoding: | UTF-8 |
RoxygenNote: | 7.1.1 |
VignetteBuilder: | knitr |
URL: | https://github.com/swsoyee/pagemapR |
BugReports: | https://github.com/swsoyee/pagemapR/issues |
NeedsCompilation: | no |
Packaged: | 2021-08-27 16:22:47 UTC; suwei |
Author: | Wei Su |
Repository: | CRAN |
Date/Publication: | 2021-09-02 11:00:02 UTC |
Mini Map of Page
Description
Create mini map for single web page.
Usage
pagemap(id, box_style = list(), ..., elementId = NULL)
Arguments
id |
|
box_style |
a |
... |
additional options passed to |
elementId |
|
See Also
Examples
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)"
)
)
Shiny bindings for pagemap
Description
Output and render functions for using pagemap within Shiny applications and interactive Rmd documents.
Usage
pagemapOutput(outputId, width = "100%", height = "auto")
renderPagemap(expr, env = parent.frame(), quoted = FALSE)
Arguments
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 |
See Also
Examples
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())
}
)
}