Interactive Visualizations for Profiling R Code

Interactive visualizations for profiling R code.

Profvis is a tool for visualizing code profiling data from R. It creates a web page which provides a graphical interface for exploring the data. Live demo.


See the documentation site.

To run code with profiling, wrap the expression in profvis(). By default, this will result in the interactive profile visualizer opening in a web browser. You can see a live demo here.

  g <- ggplot(diamonds, aes(carat, price)) + geom_point(size = 1, alpha = 0.2)

The profvis() call returns an htmlwidget, which by default when printed opens a web browser. If you wish to save the object, it won't open the browser at first, but you can view it later by typing the variable name at the console, or calling print() on it.

p <- profvis({
  g <- ggplot(diamonds, aes(carat, price)) + geom_point(size = 1, alpha = 0.2)
# View it with:
# or print(p)


Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


0.3.3 by Winston Chang, 10 months ago

Browse source code at

Authors: Winston Chang [aut, cre], Javier Luraschi [aut], RStudio [cph], jQuery Foundation [cph] (jQuery library), jQuery contributors [ctb, cph] (jQuery library; authors listed in inst/www/shared/jquery-AUTHORS.txt), Mike Bostock [ctb, cph] (D3 library), D3 contributors [ctb] (D3 library), Ivan Sagalaev [ctb, cph] (highlight.js library)

Documentation:   PDF Manual  

GPL-3 | file LICENSE license

Imports htmlwidgets, stringr

Suggests knitr, ggplot2, rmarkdown, testthat, devtools

Suggested by, biwavelet.

See at CRAN