| filterProfileData {proftools} | R Documentation | 
Filter Profile Data
Description
Allow profile data to be filtered on several criteria.
Usage
filterProfileData(pd, ..., normalize = FALSE, regex = FALSE)
Arguments
| pd | profile data as returned by  | 
| ... | filter specifications is  | 
| normalize | logical; if true the total hit count is set to the total number of hits in the reduced profile data; otherwise the original value is retained. | 
| regex | logical; if true the specifications in  | 
Details
This function can be used to make plots and summaries more readable or relevant by removing functions that are not of direct interest or have low hit counts.
Filters are specified in filter = value form with value
typically specifying a filter level or argument. Possible filters and
their argument values are:
- select
- character vector specifying names of functions; call stacks not containing functions matching any of these names are dropped. 
- omit
- character vector specifying names of functions; call stacks containing functions matching any of these names are dropped. 
- focus
- character vector specifying names of functions; call stacks not containing functions matching any of these names are dropped, and functions at the bottom of the stack not matching the - focusspecification are dropped.
- skip
- integer; the number of elements to trim from the bottom of the stacks. 
- maxdepth
- integer; stacks are truncated to have at most - maxdepthelements.
- self.pct
- numeric; functions at the bottom of the stacks with self percentages below this value are removed. 
- total.pct
- numeric; functions at the top of the stacks with total percentages below this value are removed. 
- interval
- inter vector of length 2 specifying first and last sample to use. 
- merge.pct
- numeric; functions at the top of the stacks are removed and stack traces merged until each retained trace accounts for at least this percentage of run time. 
Value
A reduced profile data structure.
Author(s)
Luke Tierney
See Also
Rprof,
summaryRprof,
flatProfile,
readProfileData,
plotProfileCallGraph,
profileCallGraph2Dot
Examples
pd <- readProfileData(system.file("samples", "glmEx.out", package="proftools"))
plotProfileCallGraph(pd)
plotProfileCallGraph(filterProfileData(pd, self.pct = 1))
plotProfileCallGraph(filterProfileData(pd, self.pct = 1, total.pct = 10))
plotProfileCallGraph(filterProfileData(pd, select = "glm", self.pct=1,
                                       total.pct=10))