Interactive Visualizations for Profiling R Code

Interactive visualizations for profiling R code.


profvis

R-CMD-check Codecov test coverage

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.

Installation

install.packages("profvis")

Example

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.

library(profvis)

f <- function() {
  pause(0.1)
  g()
  h()
}
g <- function() {
  pause(0.1)
  h()
}
h <- function() {
  pause(0.1)
}

profvis(f())

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(f())

# View it with:
p
# 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.

install.packages("profvis")

0.4.0 by Hadley Wickham, 2 years ago


https://profvis.r-lib.org, https://github.com/r-lib/profvis


Report a bug at https://github.com/r-lib/profvis/issues


Browse source code at https://github.com/cran/profvis


Authors: Hadley Wickham [aut, cre] , Winston Chang [aut] , Javier Luraschi [aut] , Timothy Mastny [aut] , Posit Software , PBC [cph, fnd] , jQuery Foundation [cph] (jQuery library) , jQuery contributors [ctb, cph] (jQuery library; authors listed in inst/htmlwidgets/lib/jquery/AUTHORS.txt) , Mike Bostock [ctb, cph] (D3 library) , D3 contributors [ctb] (D3 library) , Ivan Sagalaev [ctb, cph] (highlight.js library)


Documentation:   PDF Manual  


MIT + file LICENSE license


Imports htmlwidgets, rlang, vctrs

Suggests htmltools, knitr, rmarkdown, shiny, testthat


Imported by RobinHood, devtools.

Suggested by arl, cramR, debrief, ggplot2, gtable, icmstate, pureseqtmr.


See at CRAN