The R Journal: article published in 2015, volume 7:2

Code Profiling in R: A Review of Existing Methods and an Introduction to Package GUIProfiler PDF download
Angel Rubio and Fernando de Villar , The R Journal (2015) 7:2, pages 275-287.

Abstract Code analysis tools are crucial to understand program behavior. Profile tools use the results of time measurements in the execution of a program to gain this understanding and thus help in the optimization of the code. In this paper, we review the different available packages to profile R code and show the advantages and disadvantages of each of them. In additon, we present GUIProfiler, a package that fulfills some unmet needs. Package GUIProfiler generates an HTML report with the timing for each code line and the relationships between different functions. This package mimics the behavior of the MATLAB profiler. The HTML report includes information on the time spent on each of the lines of the profiled code (the slowest code is highlighted). If the package is used within the RStudio environment, the user can navigate across the bottlenecks in the code and open the editor to modify the lines of code where more time is spent. It is also possible to edit the code using Notepad++ (a free editor for Windows) by simply clicking on the corresponding line. The graphical user interface makes it easy to identify the specific lines which slow down the code. The integration in RStudio and the generation of an HTML report makes GUIProfiler a very convenient tool to perform code optimization.

Received: 2015-05-04; online 2015-11-18
CRAN packages: aprof, proftools, profr, microbenchmark, Nozzle.R1, knitr, GUIProfiler, stringr, plyr, devtools, shiny
CRAN Task Views implied by cited CRAN packages: HighPerformanceComputing, ReproducibleResearch, WebTechnologies
Bioconductor packages: Rgraphviz, graph


CC BY 4.0
This article is licensed under a Creative Commons Attribution 3.0 Unported license .

@article{RJ-2015-036,
  author = {Angel Rubio and Fernando de Villar},
  title = {{Code Profiling in R: A Review of Existing Methods and an
          Introduction to Package GUIProfiler}},
  year = {2015},
  journal = {{The R Journal}},
  doi = {10.32614/RJ-2015-036},
  url = {https://doi.org/10.32614/RJ-2015-036},
  pages = {275--287},
  volume = {7},
  number = {2}
}