carousel: Make html tags for embeding Bootstrap carousel

Description Usage Arguments Examples

Description

Make html tags for embeding Bootstrap carousel

Usage

1
2
carousel(id, img, caption_title = NULL, caption_text, interval = "5000",
  pause = "hover", wrap = TRUE, keyboard = TRUE)

Arguments

id

character. html identifiler.

img

characters vector. Path to imgs.

caption_title

charactors vector. Titles of image caption. This should have the same length of img.

caption_text

charactors vector. Texts of image caption. This should have the same length of img.

interval

integer. The amount of time to delay between automatically cycleing an item. If false, carousel will not automatically cycle.

pause

string. If set to "hover", pauses the cycling of the carousel on mouseenter and resumes the cycling of the carousel on mouseleave. If set to null, hovering over the carousel won't pause it.

wrap

Logical. Whether the carousel should cycle continuously or have hard stops.

keyboad

Logical. Whether the carousel should react to keyboard events.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# set imgs
png("plot1.png")
plot(1:10)
dev.off()
png("plot2.png")
plot(10:1)
dev.off()

# insert the function into a R chunk
carousel(id = "carousel_id", img = c("plot1.png", "plot2.png"))

kazutan/zousan documentation built on May 20, 2019, 7:54 a.m.