asPlotlyText | R Documentation |
Convert a data.frame to plotly text
asPlotlyText(df)
df |
A data.frame |
A character vector of the length of df
's number of rows.
set.seed(1)
X <- big_attachExtdata()
svd <- big_SVD(X, big_scale(), k = 10)
p <- plot(svd, type = "scores")
pop <- rep(c("POP1", "POP2", "POP3"), c(143, 167, 207))
df <- data.frame(Population = pop, Index = 1:517)
plot(p2 <- p + ggplot2::aes(text = asPlotlyText(df)))
## Not run: plotly::ggplotly(p2, tooltip = "text")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.