dendextendRcpp v0.6.1

0

Monthly downloads

0th

Percentile

by Tal Galili

Faster Dendrogram Manipulation using 'Rcpp'

Offers faster manipulation of dendrogram objects in R. A dendrogram object in R is a list structure with attributes in its nodes and leaves. 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 thanks to 'Rcpp'.

Readme

Build Status

dendextendRcpp

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:

install.packages('dendextendRcpp')

To install the cutting-edge GitHub version:

if (!require('devtools')) install.packages('devtools'); 
devtools::install_github('talgalili/dendextendRcpp')

Usage

library(dendextendRcpp)

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

labels(dend)

require(microbenchmark)
microbenchmark(stats_labels.dendrogram(dend),
               dendextendRcpp::dendextendRcpp_labels.dendrogram(dend),
               times = 100)
# about 10-30 times faster. It is faster the larger the tree is.

Contact

You are welcome to:

Available functions

  • dendextendRcpp_labels.dendrogram
  • cut_lower_fun
  • get_branches_heights
  • heights_per_k.dendrogram

MORE INFORMATION

Visit the Rcpp project!

Code of conduct

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

Functions in dendextendRcpp

Name Description
dendextendRcpp_cut_lower_fun Cut a dendrogram using Rcpp - and run a function on the output
dendextendRcpp-package Functions for extending dendextend using Rcpp
dendextendRcpp_labels.dendrogram Find Labels from a dendrogram Object using Rcpp
dendextendRcpp_get_branches_heights Get branches height attr from a dendrogram
dendextendRcpp_heights_per_k.dendrogram Which height will result in which k for a dendrogram
No Results!

Last month downloads

Details

Type Package
Date 2015-05-22
License GPL-2 | GPL-3
URL https://github.com/talgalili/dendextendRcpp/, http://cran.r-project.org/web/packages/dendextendRcpp/
BugReports https://github.com/talgalili/dendextendRcpp/issues
LinkingTo Rcpp
Packaged 2015-05-22 18:15:52 UTC; junior
NeedsCompilation yes
Repository CRAN
Date/Publication 2015-05-22 20:21:16

Include our badge in your README

[![Rdoc](http://www.rdocumentation.org/badges/version/dendextendRcpp)](http://www.rdocumentation.org/packages/dendextendRcpp)