Skip to content

Commit

Permalink
Added README
Browse files Browse the repository at this point in the history
  • Loading branch information
talgalili committed Aug 16, 2013
1 parent af49c28 commit d805de0
Showing 1 changed file with 73 additions and 0 deletions.
73 changes: 73 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# RcppDend

## Introduction

A dendrogram object in R are is a list structure with attributes in its
nodes and leaves.

## Motivation

Working with dendrogram objects often require a function
to recursively go through all (or most) element in the list object.
Naturally, such function are rather slow in R, but can become much faster
thank to Rcpp.

This package offers faster manipulation of dendrogram objects in
R.

## Installation

To install the stable version on CRAN:

```r
# install.packages('RcppDend') # not yet available from CRAN
```

To install the GitHub version:

```r
if (!require('devtools')) install.packages('devtools'); require('devtools')
install_github('RcppDend', 'talgalili')
```

## Usage

```r
library(RcppDend)

hc <- hclust(dist(USArrests))
dend <- as.dendrogram(hc)

labels(dend)

require(microbenchmark)
microbenchmark(stats:::labels.dendrogram(dend),
RcppDend:::labels.dendrogram(dend),
times = 100)
# about 30 times faster. It is faster the larger the tree is.

```

## Contact

You are welcome to:
* submit suggestions and bug-reports at: <https://github.com/talgalili/RcppDend/issues>
* send a pull request on: <https://github.com/talgalili/RcppDend/>
* compose a friendly e-mail to: <tal.galili@math.tau.ac.il>


## Available functions

* labels.dendrogram (or simply labels)


## MORE INFORMATION

Visit the Rcpp project!

* http://www.rcpp.org/
* http://gallery.rcpp.org/
* http://cran.r-project.org/web/packages/Rcpp/index.html
* http://dirk.eddelbuettel.com/code/rcpp.html
* http://blog.r-enthusiasts.com/tag/rcpp/

0 comments on commit d805de0

Please sign in to comment.