slick_combine: Slick pipe operators

%synch%R Documentation

Slick pipe operators

Description

Pipe operators to combine plots by either stacking or synching multiple sliders.

Usage

e1 %synch% e2

e1 %stack% e2

Arguments

e1

slickR htmlwidget to place on top

e2

slickR htmlwidget to place on bottom

Value

htmlwidget

Examples


if(interactive()){

# working with multiple slicks

sets <- split(
  sample(nba_team_logo$uri, size = 28, replace = FALSE),
  rep(c(1,2,3,4),each=7)
)

slicks <- lapply(sets,FUN = function(x,...){
  slickR(obj = x,...)
},height = 100)

# independent slicks

Reduce(`%stack%`,slicks)

# 1,2 synch stacked on 3,4 synch

 (slicks[[1]] %synch% slicks[[2]]) %stack% (slicks[[3]]%synch%slicks[[4]])
 
}

slickR documentation built on Dec. 28, 2022, 2:41 a.m.