Monthly Archives: November 2011

How to speed up loops in R

November 28, 2011
By
How to speed up loops in R

As with any language, there are often several ways to code up the solution to a programming problem in R. If performance of the code is important (i.e. it's something you plan to run many times, or with a lot of data), how you code the solution can often have a big impact on how fast it runs. For...

Read more »

R’s Distrotheque

November 28, 2011
By
R’s Distrotheque

(Update: The csound package is now available on CRAN.) Do your random variables need to groove more? Of course they do. That's why I've been working on the upcoming csound package for R, which connects to Csound computer synthesis software to make any sound imaginable. Your computer'll be the hippest sample space on the randomized

Read more »

Retrieve GBIF Species Occurrence Data with Function from dismo Package

November 28, 2011
By
Retrieve GBIF Species Occurrence Data with Function from dismo Package

..The dismo package is awesome: with some short lines of code you can read & map species distribution data from GBIF (the global biodiversity information facility) easily:Read more »

Read more »

Course: Financial Data Modeling and Analysis in R

November 28, 2011
By

The University of Washington is holding a web-based course which will be of interest to anyone who wants to learn about financial modeling with R: Financial Data Modeling and Analysis in R (AMATH 542) is a comprehensive introduction to the R statistical programming language for computational finance offered by the University of Washington Computational Finance program and taught by...

Read more »

Where the Worlds of Dentistry and Cartography Collide

November 28, 2011
By
Where the Worlds of Dentistry and Cartography Collide

As I was getting a root canal last week, my dental X-Rays reminded me anew of an optical illusion that stumped us for a short time recently when we were developing our heatmapping engine.My X-Rays, before during and after a recent root canal.  The...

Read more »

Predicting Gender

November 28, 2011
By
Predicting Gender

If there are two (can be generalized to n) classes and both follow the same distribution (but with different parameters) it is possible to predict which class an observations comes from. Here I’ll try to predict a sample’s gender based on their height. The distribution of a person’s height is more or less normal. There

Read more »

Another aspect of speeding up loops in R

November 28, 2011
By
Another aspect of speeding up loops in R

Any frequent reader of R-bloggers will have come across several posts concerning the optimization of code - in particular, the avoidance of loops.Here's another aspect of the same issue. If you have experience programming in other languages besides R, this is probably a no-brainer, but for laymen, like myself, the following example was...

Read more »

A nice short article on memory in R

November 28, 2011
By
A nice short article on memory in R

There is a nice short article on memory issue in R at http://www.matthewckeller.com/html/memory.html. If you use R to process large data, you might find it helpful. It introduces: - checking how much memory an object is taking; - the memory … Continue reading →

Read more »

Prime Number in R Language (CloudStat)

November 28, 2011
By
Prime Number in R Language (CloudStat)

A prime number (or a prime) is a natural number greater than 1 that has no positive divisors other than 1 and itself. R Language Code The Prime Function prime = function(n){   n = as.integer(n)   if(n > 1e8) stop(“n too large”)   primes = re...

Read more »

A Story of Life and Death. On CRAN. With Packages.

November 27, 2011
By

The Comprehensive R Archive Network, or CRAN for short, has been a major driver in the success and rapid proliferation of the R statistical language and environment. CRAN currently hosts around 3400 packages, and is growing at a rapid rate. Not too ...

Read more »