Blog Archives

Pairwise distances in R

May 26, 2013
By
Pairwise distances in R

For a recent project I needed to calculate the pairwise distances of a set of observations to a set of cluster centers. In MATLAB you can use the pdist function for this. As far as I know, there is no equivalent in the R standard packages. So I looked into writing a fast implementation for

Read more »

Using C libraries in R with rdyncall

May 12, 2013
By
Using C libraries in R with rdyncall

One reason I like using R for data analysis is that R has a great collection of packages that let you easily apply state-of-the-art methods to your problems. But once in a while you find a library that you would like to use that does not have a R wrapper, yet. While the great Rcpp

Read more »

R BLAS: GotoBLAS2 vs OpenBLAS vs MKL

November 6, 2012
By
R BLAS: GotoBLAS2 vs OpenBLAS vs MKL

Short update to Speed up R by using a different BLAS implementation/: MKL is overall the fastest OpenBLAS is faster than its parent GotoBLAS and comes close to MKL A = matrix(rnorm(n*n),n,n) A %*% A solve(A) svd(A)

Read more »

Speed up R by using a different BLAS implementation

October 30, 2012
By
Speed up R by using a different BLAS implementation

It is no news that R’s default BLAS is much slower that other available BLAS implementations. In A trick to speed up R matrix calculation/ Yu-Sung Su recommends using the ATLAS BLAS which is available on CRAN. When I learned about the possible speed-up  a while ago I tried several BLAS libraries and I found that GotoBLAS2 was

Read more »

Better R support in pygments by monkey patching SLexer

May 20, 2012
By
Better R support in pygments by monkey patching SLexer

I started using knitr with reStructuredText today and I found that the syntax highlighting with pygments (used by rst2html.py) was not as nice as the output of pandoc. So I ended up doing some monkeypatching. Try adding the following to rst2html.py: Before: After: Note: I assume you already added pygments’ rst-directive.py to rst2html.py.

Read more »

Search R-bloggers

Sponsors

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)