This is a test of the testjs package within an R Markdown document. (testjs is a test package I created in order to learn about htmlwidgets.)

Load the library.

library(testjs)

Simulate some data.

x <- rnorm(100)
grp <- sample(1:3, 100, replace=TRUE)
y <- x*grp + rnorm(100)

Try out the iplot function. (Need to limit the width and height to fit within what R Markdown expects.)

iplot(x, y, grp, chartOpts=list(width=600, height=400))


kbroman/testjs documentation built on May 20, 2019, 8:14 a.m.