printHTML.trackInfo creates a subdirectory named
"result" in the base directory specified via baseDir. All HTML pages
and images will be put
in that directory.
Usage
printHTML.trackInfo(object, baseDir = ".")
Arguments
object
'trackInfo' S3 class object (list), containing the result of the
function tracker.
baseDir
A character string, specifying the base directory for
the HTML pages to be written to. Defaults to the current working directory.
Details
An "index.html" page will be created in the directory
"results" which is the root entry page of the HTML pages. The
displayed result for every tracked function consists of two HTML pages.
The first page is an overview on how
often every line of code was executed. Code lines not executed are
highlighted red, executed lines are shown in green. The second page is
a graph representation of the
execution flow of the function. Each code line has a edge pointing to
the next code line that is executed subsequently. Thus loops and jumps
become clearly visible.
Author(s)
Thomas König, Klaus Jünemann
& Matthias Burger
See Also
tracker for the call tracking object definition.
Examples
## example function
foo <- function(x){
y <- 0
for(i in 1:100)
{
y <- y + i
}
return(y)
}
## the name track is necessary
track <- tracker()
## initialize the tracker
track$init()
## inspect the function
## res is the result of foo
res <- inspect(foo(10), track = track)
## get the tracking info
resTrack <- track$getTrackInfo()
## create HTML pages
printHTML.trackInfo(resTrack)
Results
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(RUnit)
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/RUnit/printHTML.trackinfo.Rd_%03d_medium.png", width=480, height=480)
> ### Name: printHTML.trackInfo
> ### Title: Write HTML pages of the tracking result.
> ### Aliases: printHTML.trackInfo printHTML
> ### Keywords: programming
>
> ### ** Examples
>
>
> ## example function
> foo <- function(x){
+ y <- 0
+ for(i in 1:100)
+ {
+ y <- y + i
+ }
+ return(y)
+ }
>
> ## the name track is necessary
> track <- tracker()
>
> ## initialize the tracker
> track$init()
>
> ## inspect the function
> ## res is the result of foo
> res <- inspect(foo(10), track = track)
>
> ## get the tracking info
> resTrack <- track$getTrackInfo()
>
> ## create HTML pages
> printHTML.trackInfo(resTrack)
>
>
>
>
>
> dev.off()
null device
1
>