Blog Archives

Stochastic SIR Epidemiological Compartment Model

April 24, 2015
By
Stochastic SIR Epidemiological Compartment Model

Introduction This post is a simple introduction to Rcpp for disease ecologists, epidemiologists, or dynamical systems modelers - the sorts of folks who will benefit from a simple but fully-working example. My intent is to provide a complete, self-contained introduction to modeling with Rcpp. My hope is that this model can be easily modified to run any dynamical simulation that has dependence on the...

Read more »

Stochastic SIR Epidemiological Compartment Model

April 24, 2015
By
Stochastic SIR Epidemiological Compartment Model

Introduction This post is a simple introduction to Rcpp for disease ecologists, epidemiologists, or dynamical systems modelers - the sorts of folks who will benefit from a simple but fully-working example. My intent is to provide a complete, self-contained introduction to modeling with Rcpp. My hope is that this model can be easily modified to run any dynamical simulation that has dependence on the...

Read more »

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 »

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 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 »

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 »

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 »

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)