-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathREADME
60 lines (40 loc) · 2.16 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
A Graphical User Interface for Examining R Profile Output
=========================================================
This package provides a GUI for the proftools package. The main widget
features include call trees, function summaries and source annotations.
The widget is interactive, giving the user the capability to alter viewing
options and use plotting tools from within the widget.
Note: This package requires the proftools package. There are two versions for the GUI.
One uses the gWidgets2 and gWidgets2RGtk2 packages, while the other uses Shiny.
EXPORTED FUNCTIONS
The package exports one function:
proftoolsGUI launches a GUI widget with interactive profiling tools for
Rprof output.
A SIMPLE EXAMPLE
Load required packages
library(proftools)
library(gWidgets2)
library(gWidgets2RGtk2)
Read in the profile data for the example in the proftools package and use the Shiny GUI
pd <- readProfileData(system.file("samples", "Rprof-lmfit-mem.out",
package="proftoolsGUI"))
proftoolsGUI(pd, method = "shiny")
Alternatively, if you are using gWidgets2, just launch the widget and use the file menu to browse
and select the stack file. You can alter viewing options from witing the
widget rather than specifying the arguments when calling the function.
proftoolsGUI(NULL, method = "gwidgets")
Note that source annotations are not shown. This is because the source
filenames given in Rprof-rec-mem.out cannot be found in the working directory.
We can fix this by temporarily changing the working directory to the samples
directory in the proftoolsGUI package.
oldDir <- getwd()
setwd(system.file("samples", package="proftoolsGUI"))
pd <- readProfileData(system.file("samples", "Rprof-lmfit.out",
package="proftoolsGUI"))
proftoolsGUI(pd)
When done working with the widget, change the working directory back to the
original one.
setwd(oldDir)
Thanks
Thanks to Professor John Verzani for answering questions about his colorful
package gWidgets2.