Learn R Programming

bigstatsr (version 1.6.1)

asPlotlyText: Plotly text

Description

Convert a data.frame to plotly text

Usage

asPlotlyText(df)

Value

A character vector of the length of df's number of rows.

Arguments

df

A data.frame

Examples

Run this code
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)))
if (FALSE) plotly::ggplotly(p2, tooltip = "text")

Run the code above in your browser using DataLab