Interactive Visualizations for Profiling R Code

Interactive visualizations for profiling R code.

Travis-CI Build Status

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)


profvis 0.3.4

  • Fixed #77: The contents of <expr> are now always listed first.

  • Addressed #85: The pause() function is now implemented in C, which reduces the amount of data generated.

  • Fixed #86: In the data pane, toggling between horizontal/vertical view caused the flame graph to render on top of the tree view.

  • Fixed #84: In the data pane, leaf nodes (representing top-most calls on the stack) were not displayed.

  • Addressed #82: In the data pane, if a node has exactly one child, that child will automatically be expanded. This makes it more efficient to explore the data. (#83)

  • Fixed #50: In the data pane, function calls were shown in reverse order.

profvis 0.3.3

  • Fixed #68: Profvis threw an error when a package was installed using devtools::install_github(args = "--with-keep.source").

  • Fix bug where, when loading a profile that didn't contain memory data, profvis would throw an error. #66

  • Fixed #73: Profvis would throw an error if used on code sourced from a remote URL.

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.5 by Winston Chang, 4 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

See at CRAN