Learn R Programming

⚠️There's a newer version (0.4.0) of this package.Take me there.

Profvis

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")

Documentation

See the documentation site.

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)
library(ggplot2)

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

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)
  print(g)
})


# View it with:
p
# or print(p)

Copy Link

Version

Install

install.packages('profvis')

Monthly Downloads

192,616

Version

0.3.8

License

GPL-3 | file LICENSE

Maintainer

Winston Chang

Last Published

May 2nd, 2023

Functions in profvis (0.3.8)

parse_rprof

Parse Rprof output file for use with profvis
profvisOutput

Widget output function for use in Shiny
profvis_ui

Profvis UI for Shiny Apps
profvis

Profile an R expression and visualize profiling data
print.profvis

Print a profvis object
renderProfvis

Widget render function for use in Shiny
pause

Pause an R process