-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.Rmd
73 lines (54 loc) · 1.93 KB
/
README.Rmd
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
61
62
63
64
65
66
67
68
69
70
71
72
73
---
output:
md_document:
variant: markdown_github
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, echo = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "README-"
)
```
# prof.tree
[![Travis-CI Build Status](https://travis-ci.org/artemklevtsov/prof.tree.svg?branch=master)](https://travis-ci.org/artemklevtsov/prof.tree) [![Coverage Status](https://img.shields.io/codecov/c/github/artemklevtsov/prof.tree/master.svg)](https://codecov.io/github/artemklevtsov/prof.tree?branch=master) [![CRAN Status](http://www.r-pkg.org/badges/version/prof.tree)](https://cran.r-project.org/package=prof.tree)
Provide an alternative profiling data diplay as tree structure.
## Installation
To install the latest release version from CRAN with:
```r
install.packages("prof.tree")
```
To install the development version the `install_github()` function from `devtools` package can be used:
```r
devtools::install_github("artemklevtsov/prof.tree")
```
## Example
```{r engine = "Rscript"}
times <- 4e5
cols <- 150
data <- as.data.frame(x = matrix(rnorm(times * cols, mean = 5), ncol = cols))
data <- cbind(id = paste0("g", seq_len(times)), data)
Rprof(tmp <- tempfile())
data1 <- data # Store in another variable for this run
# Get column means
means <- apply(data1[, names(data1) != "id"], 2, mean)
# Subtract mean from each column
for (i in seq_along(means))
data1[, names(data1) != "id"][, i] <- data1[, names(data1) != "id"][, i] - means[i]
Rprof(NULL)
library(prof.tree)
prof.tree(tmp)
unlink(tmp)
```
## Bug reports
First check the changes in the latest version of the package. Type type into R:
```r
news(package = "prof.tree", Version == packageVersion("prof.tree"))
```
Try reproduce a bug with the latest development version from Git.
To report a bug please type into R:
```r
utils::bug.report(package = "prof.tree")
```
Post the `traceback()` and `sessionInfo()` output also may be helpful.