Clickme is an R package that lets you create interactive visualizations in the browser, directly from your R session.
That means you can minimize your use of boring static plots.
Just run this in R to install Clickme:
install.packages("devtools") # you don't need to run this command if you already have the devtools package installed.
devtools::install_github("clickme", "nachocab")
If there is a new Clickme version a few days later, you can update by simply re-running that last command.
Let's take it out for a spin.
library(clickme)
clickme("points", rnorm(100)) # try zooming in and out, click the Show names button, hover over points
Clickme remembers the most recently used template, so you don't need to specify it again
clickme(rnorm(50))
A more interesting example
data(microarray)
clickme("points", x = microarray$significance, y = microarray$logFC,
color_groups = ifelse(microarray$adj.P.Val < 1e-4, "Significant", "Noise"),
names = microarray$gene_name,
x_title = "Significance (-log10)", y_title = "Fold-change (log2)",
extra = list(Probe = microarray$probe_name))
You can also try lines
xy_values <- list(line1 = data.frame(x = 1:4, y = 5:8),
line2 = data.frame(x = 1:5, y = 10:14))
clickme("lines", xy_values, radius = 5)
Thank you Mike Bostock. Making the D3.js library more accessible was my strongest motivation for developing Clickme.
Thank you Yihui Xie. The knitr R package has shown me the importance of building bridges across technologies, while also turning my scientific ramblings into reproducible work.
Thank you Hadley Wickam. The testthat R package has been consistently saving my butt since I started coding for a living.
There are other fine people trying to move visualization to the browser. Check out rCharts by Ramnath Vaidyanathan.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.