# NOT RUN {
if (requireNamespace("plotly")) {
g <- function() sample(0:1, n, prob=c(1 - p, p), replace=TRUE)
set.seed(2); n <- 100; p <- 0.5
x1 <- g(); label(x1) <- 'A long label for x1 that describes it'
x2 <- g()
x3 <- g(); label(x3) <- 'This is<br>a label for x3'
x4 <- g()
combplotp(~ x1 + x2 + x3 + x4, showno=TRUE, includenone=TRUE)
n <- 1500; p <- 0.05
pain <- g()
anxiety <- g()
depression <- g()
soreness <- g()
numbness <- g()
tiredness <- g()
sleepiness <- g()
combplotp(~ pain + anxiety + depression + soreness + numbness +
tiredness + sleepiness, showno=TRUE)
}
# }
Run the code above in your browser using DataLab