MyNixOS website logo
Description

Create Mini Map for Web Pages.

Quickly and easily add a mini map to your 'rmarkdown' html documents.

pagemapR

R build status CRAN_Status_Badge metacran downloads

Introduction

This is an R package that provides support for pagemap as a htmlwidgets.
Quickly and easily add a mini map to your rmarkdown html documents. See a demonstration here.

Note: To distinguish it from the original project pagemap, the name of this project is pagemapR, but the package name is pagemap.

Installation

install.packages("pagemap")

Or use devtools to install the latest development version.

# install.packages("devtools")
devtools::install_github("swsoyee/pagemapR")

Usage

It’s very simple to use.

library(pagemap)
pagemap()

You could fix it’s position on the screen and style by providing a list of css property.

pagemap(
  id = "mini_map",
  box_style = list(left = "5px", top = "10px")
)

You could also customize the internal style of the mini map through the API provided by pagemap.

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)"
  )
)

Or add a pagemap for your Shiny app:

if (interactive()) {
  shinyApp(
    ui = fluidPage(pagemapOutput("pagemap")),
    server = function(input, output) {
      output$pagemap <- renderPagemap(pagemap())
    }
  )
}

Credit

This package is thanks to the work done by Lars Jung (the author of the original Javascript package pagemap. Also, thanks should also go to Ramnath Vaidyanathan, Kenton Russell, and RStudio, Inc. for the amazing work on create htmlwigets package. The hex sticker of pagemapis produced by hexSticker and ggplot2, so special thanks goes to the Guangchuang YU (<https://guangchuangyu.github.io) and the ggplot2 development team.

Contact

You are welcome to:

Code of Conduct

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

Metadata

Version

0.1.3

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows