MyNixOS website logo
Description
In-Text Resize for Images, Tables and Fancy Resize Containers in 'shiny', 'rmarkdown' and 'quarto' Documents
Automatic resizing toolbar for containers, images and tables. Various resizer or expandable container functionalities are also included. Most suitable to include in 'shiny', 'markdown' and 'quarto' documents.

r2resize 1.9.1: In-text resizing of containers, images and tables in Rmarkdown documents and R based apps

Official site: https://r2resize.obi.obianom.com

Demo output: View here

Demo complete YouTube tutorial: View here

Demo short video: View here

Sample R code to get started: View here

Other packages required for r2resize: View here

RPKG.net package page for r2resize: View here

CRAN_Status_Badge CRAN_Status_Badge

The recommendation is that you download the latest version of this package from CRAN, as I am constantly updating this repository. If you do download from here, know that things may break sometimes

Installation

# From CRAN
install.packages(r2resize)

# OR from Github
library(devtools)
install_github("oobianom/r2resize")

# Load library and begin using functions
library(r2resize)

# JQuery is required for most of the functions to run effectively
add.JQuery() #optional: only add if the page does not automatically include JQuery

Screenshots:

Use in Rmarkdown or Quarto document to add resizing toolbar to images and tables on the page

Code:



r2resize::add.resizer(
  theme.color = "black",
  position = "top",
  font.size = "12px",
  font.color = "black",
  tables = TRUE,
  images = TRUE,
  line.color = "orange",
  line.height = 5,
  line.width = 200,
  default.image.width = "40%"
)

Use in Shiny, Rmarkdown or Quarto document

As of version 1.6, the flexCard() function

Output:

Code:

flexCard(
  image = c(bg = "image1.jpg", icon = "edit", title="Sample text 1",subtitle="A cool subtitle"),
  image = c(bg = "image2.jpg", icon = "fire", title="Another sample text",subtitle="Focused subt title"),
  image = c(bg = "image3.jpg", icon = "wifi", title="Sample text 2",subtitle="Color text",text.color="brown"),
  image = c(bg = "image4.jpg", icon = "user", title="Sample text 3",subtitle="Color text and icon",icon.color="blue",text.color="purple"),
  image = c(bg = "image5.jpg", icon = "folder", title="Sample text 3",subtitle="Sub it is"),
  image = c(bg = "image6.jpg", icon = "key", title="Sample text 4",subtitle="Sub it is"),
  image = c(bg = "image7.jpg", icon = "lock", title="Smaple",subtitle="Sub it is",text.color="green"),
  image = c(bg = "image8.jpg", icon = "plus",icon.color="red"),
  border.color = "gray",
  border.width.px = 0,
  active.panel = 2
)

Also, the elastiCard() function

Output:

Code:

elastiCard(
  image = c(bg = "image1.jpg", title="Sample text 3",subtitle="Sub it is",descr="Sample description"),
  image = c(bg = "image2.jpg", icon = "key", title="Sample text 4",subtitle="Sub it is"),
  image = c(bg = "image3.jpg", icon = "lock", title="Smaple",subtitle="Sub it is",text.color="brown"),
  image = c(bg = "image4.jpg"),
  border.color = "black",
  border.width.px = 5
)

Also, the splitCard2() function

Output:

Code:

splitCard2(
  "question text 1",
  "answer text 2",
  bg.right.color = "black",
  bg.left.color = "red",
  text.left.color = "white",
  text.right.color = "white",
  slider.position = "95"
)

And so many more cool features...

windowCard()

emphasisCard()

sizeableCard()

splitCard()

NOTE: Please note that r2resize::add.resizer() should only be used in Rmarkdown or Quarto

By Obinna Obi Obianom, Creator of www.rpkg.net and www.shinyappstore.com.
Metadata

Version

1.9.1

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