Package profvis. R topics documented:

Similar documents
Package canvasxpress

Package vdiffr. April 27, 2018

Package pairsd3. R topics documented: August 29, Title D3 Scatterplot Matrices Version 0.1.0

Package jstree. October 24, 2017

Package datasets.load

Package d3plus. September 25, 2017

Package slickr. March 6, 2018

Package tfruns. February 18, 2018

Package htmltidy. September 29, 2017

Package d3heatmap. February 1, 2018

Package collapsibletree

Package sigmanet. April 23, 2018

Package htmlwidgets. July 10, 2017

Package htmlwidgets. February 25, 2016

Package processanimater

Package fastdummies. January 8, 2018

Package scatterd3. March 10, 2018

Package tabulizer. June 7, 2018

Package radix. September 17, 2018

Package metricsgraphics

Package shiny.semantic

Package shinytest. May 7, 2018

Package ECctmc. May 1, 2018

Package remotes. December 21, 2017

Package knitrprogressbar

Package pdfsearch. July 10, 2018

Package cattonum. R topics documented: May 2, Type Package Version Title Encode Categorical Features

Package shinyaframe. November 26, 2017

Package covr. October 18, 2018

Package robotstxt. November 12, 2017

Package githubinstall

Package clipr. June 23, 2018

Package restorepoint

Package datapasta. January 24, 2018

Package pkgload. July 8, 2018

Package condformat. October 19, 2017

Package revealjs. R topics documented: March 13, Type Package

Package editdata. October 7, 2017

Package io. January 15, 2018

Package liftr. R topics documented: May 14, Type Package

Package docxtools. July 6, 2018

Package eply. April 6, 2018

Package ggimage. R topics documented: December 5, Title Use Image in 'ggplot2' Version 0.1.0

Package geojsonsf. R topics documented: January 11, Type Package Title GeoJSON to Simple Feature Converter Version 1.3.

Package rtext. January 23, 2019

Package ggimage. R topics documented: November 1, Title Use Image in 'ggplot2' Version 0.0.7

Package barcoder. October 26, 2018

Package gggenes. R topics documented: November 7, Title Draw Gene Arrow Maps in 'ggplot2' Version 0.3.2

Package shinyfeedback

Package validara. October 19, 2017

Package modules. July 22, 2017

Package texpreview. August 15, 2018

Package simplecache. August 22, 2017

Package QCAtools. January 3, 2017

Package fitbitscraper

Package clustering.sc.dp

Package edfreader. R topics documented: May 21, 2017

Package tablehtml. November 5, 2017

Package loggit. April 9, 2018

Package opencage. January 16, 2018

Package climber. R topics documented:

Package rsppfp. November 20, 2018

Package weco. May 4, 2018

Package pkgbuild. October 16, 2018

Package hyphenatr. August 29, 2016

Package gtrendsr. October 19, 2017

Package reval. May 26, 2015

Package internetarchive

Package colourpicker

Package nngeo. September 29, 2018

Package rwars. January 14, 2017

Package RODBCext. July 31, 2017

Package mdftracks. February 6, 2017

Package vinereg. August 10, 2018

Package jpmesh. December 4, 2017

Package TnT. November 22, 2017

Package semver. January 6, 2017

Package shinydashboard

Package BiocManager. November 13, 2018

Package rcmdcheck. R topics documented: November 10, 2018

Package tiler. June 9, 2018

Package WordR. September 7, 2017

Package readxl. April 18, 2017

Package gtrendsr. August 4, 2018

Package lumberjack. R topics documented: July 20, 2018

Package ggextra. April 4, 2018

Package taskscheduler

Package rhandsontable

Package effectr. January 17, 2018

Package shinyhelper. June 21, 2018

Package fingertipsr. May 25, Type Package Version Title Fingertips Data for Public Health

Package smapr. October 20, 2017

Package geneslope. October 26, 2016

Package regexselect. R topics documented: September 22, Version Date Title Regular Expressions in 'shiny' Select Lists

Package ezknitr. September 16, 2016

Package gridgraphics

Package sankey. R topics documented: October 22, 2017

Package cloudml. June 12, 2018

Package confidence. July 2, 2017

Package deductive. June 2, 2017

Transcription:

Package profvis January 14, 2017 Title Interactive Visualizations for Profiling R Code Version 0.3.3 Interactive visualizations for profiling R code. Depends R (>= 3.0) Imports htmlwidgets (>= 0.3.2), stringr License GPL-3 file LICENSE Suggests knitr, ggplot2, rmarkdown, testthat, devtools RoxygenNote 5.0.1 URL https://rstudio.github.io/profvis/ NeedsCompilation no Author 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) Maintainer Winston Chang <winston@rstudio.com> Repository CRAN Date/Publication 2017-01-14 00:55:39 R topics documented: parse_rprof......................................... 2 pause............................................ 2 print.profvis......................................... 3 profvis............................................ 3 profvisoutput........................................ 5 renderprofvis........................................ 5 Index 6 1

2 pause parse_rprof Parse Rprof output file for use with profvis Parse Rprof output file for use with profvis parse_rprof(path = "Rprof.out", expr_source = NULL) path expr_source Path to the Rprof output file. If any source refs in the profiling output have an empty filename, that means they refer to code executed at the R console. This code can be captured and passed (as a string) as the expr_source argument. pause Pause an R process This function pauses an R process for some amount of time. It differs from Sys.sleep in that time spent in pause will show up in profiler data. Another difference is that pause uses up 100 whereas Sys.sleep does not. pause(seconds) seconds Number of seconds to pause. Examples # Wait for 0.5 seconds pause(0.5)

print.profvis 3 print.profvis Print a profvis object Print a profvis object ## S3 method for class 'profvis' print(x,..., width = NULL, height = NULL, split = NULL) x The object to print.... Further arguments to passed on to other print methods. width height split Width of the htmlwidget. Height of the htmlwidget Direction of split. Either "v" (the default) for vertical, or "h" for horizontal. This is the orientation of the split bar. profvis Profile an R expression and visualize profiling data This function will run an R expression with profiling, and then return an htmlwidget for interactively exploring the profiling data. profvis(expr = NULL, interval = 0.01, prof_output = NULL, prof_input = NULL, width = NULL, height = NULL, split = c("h", "v"), torture = 0) expr interval prof_output Code to profile. Not compatible with prof_input. Interval for profiling samples, in seconds. Values less than 0.005 (5 ms) will probably not result in accurate timings Name of an Rprof output file or directory in which to save profiling data. If NULL (the default), a temporary file will be used and automatically removed when the function exits. For a directory, a random filename is used.

4 profvis prof_input width height split torture The path to an Rprof data file. Not compatible with expr or prof_output. Width of the htmlwidget. Height of the htmlwidget Direction of split. Either "v" (the default) for vertical, or "h" for horizontal. This is the orientation of the split bar. Triggers garbage collection after every torture memory allocation call. Note that memory allocation is only approximate due to the nature of the sampling profiler and garbage collection: when garbage collection triggers, memory allocations will be attributed to different lines of code. Using torture = steps helps prevent this, by making R trigger garbage collection afer every torture memory allocation step. Details An alternate way to use profvis is to separately capture the profiling data to a file using Rprof(), and then pass the path to the corresponding data file as the prof_input argument to profvis(). See Also print.profvis for printing options. Rprof for more information about how the profiling data is collected. Examples # Only run these examples in interactive R sessions if (interactive()) { # Profile some code profvis({ dat <- data.frame( x = rnorm(5e4), y = rnorm(5e4) ) plot(x ~ y, data = dat) m <- lm(x ~ y, data = dat) abline(m, col = "red") }) # Save a profile to an HTML file p <- profvis({ dat <- data.frame( x = rnorm(5e4), y = rnorm(5e4) ) plot(x ~ y, data = dat) m <- lm(x ~ y, data = dat) abline(m, col = "red")

profvisoutput 5 }) htmlwidgets::savewidget(p, "profile.html") # Can open in browser from R browseurl("profile.html") } profvisoutput Widget output function for use in Shiny Widget output function for use in Shiny profvisoutput(outputid, width = "100%", height = "600px") outputid width height Output variable for profile visualization. Width of the htmlwidget. Height of the htmlwidget renderprofvis Widget render function for use in Shiny Widget render function for use in Shiny renderprofvis(expr, env = parent.frame(), quoted = FALSE) expr env quoted An expression that returns a profvis object. The environment in which to evaluate expr. Is expr a quoted expression (with quote())?

Index parse_rprof, 2 pause, 2 print.profvis, 3, 4 profvis, 3 profvisoutput, 5 quote, 5 renderprofvis, 5 Rprof, 2, 4 Sys.sleep, 2 6