Monthly Archives: February 2011

Example 8.27: using regular expressions to read data with variable number of words in a field

February 25, 2011
By
Example 8.27: using regular expressions to read data with variable number of words in a field

A more or less anonymous reader commented on our last post, where we were reading data from a file with a varying number of fields. The format of the file was:1 Las Vegas, NV --- 53.3 --- --- 12 Sacramento, CA --- 42.3 --- --- 2The complication in the...

Read more »

snow and ssh — secure inter-machine parallelism with R

February 24, 2011
By

I just threw a post up on Revolutions, which got a lot longer than I planned. And got me thinking. And reading (see refs in previous post). And trying. Turns out that it was way easier than I thought! The problem:From the blog post: " OpenSSH is now available on all platforms. A sensible solution...

Read more »

MT4 -> Multi-R sessions for tick-analysis

February 24, 2011
By
MT4 -> Multi-R sessions for tick-analysis

The Shared-Memory between multiple R sessions mentioned in my previous post got me thinking … quite some potential indeed. As a result, I investigated further using (calling) multiple R sessions from the same MT4 script. Specifically, I wanted to have a clearer understanding of the time required to performed lightning fast & dead slow processing,

Read more »

How to read and write Stata data (.dta) files into R

February 24, 2011
By
How to read and write Stata data (.dta) files into R

Here's an R tutorial where I explain how to read Stata data files into R (even if you don't own the program Stata). I also offer some other basic tips.Of note, you can also write Stata .dta files from R (if your coauthors or journals insist on having ...

Read more »

when Nuns or Hells Angels get in a plane

February 24, 2011
By
when Nuns or Hells Angels get in a plane

Today, at lunch, Matthieu told us a nice story (or call it a paradox if you like) about the probability to find you seat empty when you get in a place.  a plane full of nunsAssume that you are in the line to get in the airplane, you are the ...

Read more »

Packages for By-Group Processing in R

February 24, 2011
By

Analyst and BI expert Steve Miller takes a look at the facilities in R for doing "by-group" processing of data. The task consisted of: ... read several text files, merge the results, reshape the intermediate data, calculate some new variables, take care of missing values, attend to meta data, execute a few predictive models and graph the results. Then...

Read more »

Split a Data Frame into Testing and Training Sets in R

February 24, 2011
By

I recently analyzed some data trying to find a model that would explain body fat distribution as predicted by several blood biomarkers. I had more predictors than samples (p>n), and I didn't have a clue which variables, interactions, or quadratic terms made biological sense to put into a model.I then turned to a few data mining procedures that I...

Read more »

Split a Data Frame into Testing and Training Sets in R

February 24, 2011
By

I recently analyzed some data trying to find a model that would explain body fat distribution as predicted by several blood biomarkers. I had more predictors than samples (p>n), and I didn't have a clue which variables, interactions, or quadratic terms made biological sense to put into a model.I then turned to a few data mining procedures that I...

Read more »

Phenotypic selection analysis in R

February 24, 2011
By
Phenotypic selection analysis in R

I have up to recently always done my phenotypic selection analyses in SAS. I finally got some code I think works to do everything SAS would do. Feedback much appreciated!########################Selection analyses#############################install.pac...

Read more »

Rcpp 0.9.2

February 24, 2011
By

The 0.9.2 release of Rcpp is now on CRAN and Debian.This version contains a build fix for the older 10.5.* version of OS X and its g++ 4.2.1 compiler; we now skip one test that upset it. CRAN builds for OS X should resume. We also added simple ...

Read more »