Blog Archives

Call matplotlib from R

April 1, 2015
By
Call matplotlib from R

Motivation I often use Python and matplotlib for exploring measurement data (from e.g. accelerometers), even if I use R for the actual analysis. The reason is that I like to be able to flexibly zoom into different parts of the plot using the mouse and this works well for me with matplotlib. So I decided to try to call matplotlib from R using...

Read more »

Parsing Dates and Times

March 21, 2015
By
Parsing Dates and Times

Motivation R has excellent for dates and times via the built-in Date and POSIXt classes. Their usage, however, is not always as straightforward as one would want. Certain conversions are more cumbersome than we would like: while as.Date("2015-03-22"), would it not be nice if as.Date("20150322") (a format often used in logfiles) also worked, or for that matter as.Date(20150322L) using an integer variable, or...

Read more »

Parsing Dates and Times

March 21, 2015
By
Parsing Dates and Times

Motivation R has excellent support for dates and times via the built-in Date and POSIXt classes. Their usage, however, is not always as straightforward as one would want. Certain conversions are more cumbersome than we would like: while as.Date("2015-03-22"), would it not be nice if as.Date("20150322") (a format often used in logfiles) also worked, or for that matter as.Date(20150322L) using an integer variable,...

Read more »

Create an R-tree data structure using Rcpp and Boost::Geometry

December 26, 2014
By
Create an R-tree data structure using Rcpp and Boost::Geometry

Introduction The purpose of this post is to show how to use Boost::Geometry library which was introduced recently in Rcpp. Especially, we focus on R-tree data structure for searching objects in space because only one spatial index is implemented - R-tree Currently in this library. Boost.Geometry which is part of the Boost C++ Libraries gives us algorithms for solving geometry problems. In this library, the...

Read more »

Create an R-tree data structure using Rcpp and Boost::Geometry

December 26, 2014
By
Create an R-tree data structure using Rcpp and Boost::Geometry

Introduction The purpose of this post is to show how to use Boost::Geometry library which was introduced recently in Rcpp. Especially, we focus on R-tree data structure for searching objects in space because only one spatial index is implemented - R-tree Currently in this library. Boost.Geometry which is part of the Boost C++ Libraries gives us algorithms for solving geometry problems. In this library, the...

Read more »

Sampling Importance Resampling (SIR) and social revolution.

October 22, 2014
By
Sampling Importance Resampling (SIR) and social revolution.

Motivation The purpose of this gallery post is several fold: to demonstrate the use of the new and improved C++-level implementation of R’s sample() function (see here) to demonstrate the Gallery’s new support for images in contributed posts to demonstrate the usefulness of SIR for updating posterior beliefs given a sample from an arbitrary prior distribution Application: Foreign Threats and Social Revolution The...

Read more »

Sampling Importance Resampling (SIR) and social revolution.

October 22, 2014
By
Sampling Importance Resampling (SIR) and social revolution.

Motivation The purpose of this gallery post is several fold: to demonstrate the use of the new and improved C++-level implementation of R’s sample() function (see here) to demonstrate the Gallery’s new support for images in contributed posts to demonstrate the usefulness of SIR for updating posterior beliefs given a sample from an arbitrary prior distribution Application: Foreign Threats and Social Revolution The...

Read more »

Implementing an EM Algorithm for Probit Regressions

September 30, 2014
By
Implementing an EM Algorithm for Probit Regressions

Users new to the Rcpp family of functionality are often impressed with the performance gains that can be realized, but struggle to see how to approach their own computational problems. Many of the most impressive performance gains are demonstrated with seemingly advanced statistical methods, advanced C++–related constructs, or both. Even when users are able to understand how various demonstrated features operate in isolation, examples...

Read more »

Implementing an EM Algorithm for Probit Regressions

September 30, 2014
By
Implementing an EM Algorithm for Probit Regressions

Users new to the Rcpp family of functionality are often impressed with the performance gains that can be realized, but struggle to see how to approach their own computational problems. Many of the most impressive performance gains are demonstrated with seemingly advanced statistical methods, advanced C++–related constructs, or both. Even when users are able to understand how various demonstrated features operate in isolation, examples...

Read more »

Using RcppArmadillo with bigmemory

July 24, 2014
By
Using RcppArmadillo with bigmemory

The bigmemory package allows users to create matrices that are external to R, stored either in RAM or on disk, allowing them to be bigger than the system RAM, and allowing them to be shared across R sessions. While these objects are defined by the big.matrix class in R, they are really just wrappers that point to external memory. The actual objects are implemented...

Read more »

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)