Cleans and extracts information from files produced by Rprof
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | ## Not run:
## Use examples from productplots for profiling...
if(!("Prodplot.txt" %in% dir())){
Rprof("Prodplot.txt")
library(productplots)
if (require("ggplot2")) {
prodplot(happy, ~ happy, "hbar")
prodplot(happy, ~ happy, "hspine")
prodplot(happy, ~ sex + happy, c("vspine", "hbar"))
prodplot(happy, ~ sex + happy, stacked())
## The levels argument can be used to extract a given level of the plot
prodplot(happy, ~ sex + happy, stacked(), level = 1)
prodplot(happy, ~ sex + happy, stacked(), level = 2)
}
Rprof(NULL)
}
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.