Description Usage Arguments Value Examples
plot_transitions
uses the visNetwork
package to plot a stages transition htmlWidget
graph showing stages as nodes and probabilities on edges.
1 | plot_transitions(e, height = "500px", width = "100%")
|
e |
Events dataframe containing stages. Dataframe must have |
height |
height in pct or px. |
width |
width. |
A visNetwork
htmlWidget
.
1 2 3 4 | e <- data.frame(begin = as.POSIXlt(seq(from = 0, to = 30*10, by = 30),origin = "1970-01-01"))
e$end <- as.POSIXlt(seq(from = 30, to = 30*11, by = 30), origin = "1970-01-01")
e$event = c("AWA","N1","N2","N3","N3","REM","N2","REM","N2","REM","AWA")
plot_transitions(e, height = "500px", width = "500px")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.