loryR: Make a lory.js slider of images from R

Description Usage Arguments Examples

Description

lory.js is a very nice dependency-free slider javascript library. With loryR we can incorporate our R plots easily into HTML and R markdown.

Usage

1
2
loryR(images = NULL, images_per_page = NULL, options = list(),
  width = NULL, height = NULL)

Arguments

images

list of image urls or base64 encoded src to include in the slider.

images_per_page

integer number of images shown at one time in the slider. This argument will try to intelligently apply a CSS width to each image so that it fits as expected in the slider.

options

list of options for lory.js. See lory documentation.

width

a valid CSS width

height

a valid CSS height

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## Not run: 

library(loryR)

# make some sample plots
plot(1:10,col="red")
contour(volcano)
lattice::xyplot(x~0:90, data.frame(x=cos(0:90/90)))

# if in RStudio we can get a gallery of our plots
images <- rstudio_gallery()

loryR(images, images_per_page = 2, width = "90%", options = list(rewind=T))

## End(Not run)

timelyportfolio/loryR documentation built on May 31, 2019, 1:51 p.m.