Comments on an R Connections API

May 9, 2011
By

I wrote this post months ago but never hit 'Publish'. But, the subject has changed little since then. So, here's to cleaning out the draft folder... R's connections are the heart of data/code/text input and output. Without connections, R would be crippled. Additional connections make R more ... connected with potential data sources and output

Read more »

Multiple Y-axis in a R plot

May 9, 2011
By
Multiple Y-axis in  a R plot

I often have to to plot multiple time-series with different scale of values for comparative purposes, and although placing them in different rows are useful, placing on a same graph is still useful sometimes...I searched a bit about this, and found som...

Read more »

Multiple Y-axis in a R plot

May 9, 2011
By
Multiple Y-axis in  a R plot

I often have to to plot multiple time-series with different scale of values for comparative purposes, and although placing them in different rows are useful, placing on a same graph is still useful sometimes...I searched a bit about this, and found som...

Read more »

One minor detail for getting 64-bit R-2.13 running with Eclipse/StatET

May 9, 2011
By

Upgrading from R-2.12 to R-2.13 was fairly painless, except for one minor hiccup in trying to get the 64-bit version running on my installation of Eclipse + StatET under Windows 7. The setup instructions are almost entirely the same as I have outlined ...

Read more »

Unused function parameters

May 8, 2011
By
Unused function parameters

I have started redoing the source code measurements that appear in my C book, this time using a lot more source, upgraded versions of existing tools, plus some new tools such as Coccinelle and R. The intent is to make the code and data available in a form that is easy for others to use

Read more »

Charting the Defeat of AV using R (and some ggplot2 and merge operations on top)

May 8, 2011
By
Charting the Defeat of AV using R (and some ggplot2 and merge operations on top)

In this post, I’ll be graphing some results from a recent referendum held here in the UK and combining it with the results of a set of local elections that were held at the same time. I’ll give some examples of graphing stuff using ggplot2 and will also show some info regarding merging datasets. At

Read more »

quantmod makes it easy to watch silver prices crash in R #rstats

May 7, 2011
By
quantmod makes it easy to watch silver prices crash in R #rstats

Jeffrey Ryan's quantmod package makes it simple to download and graph pricing data from a variety of sources. A couple of lines of R is all it takes to see that silver has had a very bad week.

Read more »

Slides: “Accessing Databases from R” #rstats

May 7, 2011
By
Slides: “Accessing Databases from R” #rstats

For the past few meetings of the Greater Boston useR Group, we have been opened with an introductory “useR Vignette” talk on a topic which may be helpful for new R users. This week, I presented an overview of accessing databases from R. Several people have tweeted and blogged nice things about my talk and

Read more »

Pair-Trading in R – Update

May 7, 2011
By

I found amazing R package in one of posts on R-bloggers website. It's called RcppAmadillo and you can find more info here. The function I am using from this package is called fastLm. Whereas I am interested in special case of Ax = b problem where A and...

Read more »

Corresponding

May 7, 2011
By

(The examples here work with the version of insidefunctor tagged as "v2")Unfortunately I couldn't do this cleanly outside the library. So the changes are made in insidefunctor.Levels are no longer used to "line up" eaches. So, for example,> library(insidefunctor)> `%+.%` = fmap(`+`)> `%/.%` = fmap(`/`)> x = c(1,...

Read more »

Computing Odds Ratios in R

Computing Odds Ratios in R

In my last post, I discussed the use of odds ratios to characterize the association between edibility and binary mushroom characteristics for the mushrooms characterized in the UCI mushroom dataset.  I did not, however, describe those co...

Read more »

Zurich, June 24/25, 2011 – Modern Portfolio Design with Rmetrics

May 7, 2011
By

(This article was first published on Rmetrics blogs, and kindly contributed to R-bloggers) To leave a comment for the author, please follow the link and comment on his blog: Rmetrics blogs. R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web...

Read more »

%EXPORT_TO_R SAS Macro Code

May 6, 2011
By
%EXPORT_TO_R SAS Macro Code

The SAS Analysis blog post 'A macro calls R in SAS for paneled 3d plotting' influenced my macro coding.   The following macro call: %EXPORT_TO_R(DATA = YOURDATA)  exports the SAS data set 'YOURDATA' as .csv and produces the R code for se...

Read more »

An Intuitive Approach to ROC Curves (with SAS & R)

May 6, 2011
By
An Intuitive Approach to ROC Curves  (with SAS & R)

I developed the following schematic (with annotations) based on supporting documents (link) from the article cited below. The authors used R for their work. The ROC curve in my schematic was output from PROC LOGISTIC in SAS, the scatterplot with m...

Read more »

Cuckoo eggs

May 6, 2011
By
Cuckoo eggs

In Tangente n⁰42, there was a dataset about the size of cuckoo eggs against the species (goldcrest and warbler) which built the nest. (The whole dataset from Latter is analysed in Maindonald and Braun’s Data Analysis and Graphics Using R, with a degree of caution about how trustworthy this data is…) This is

Read more »

Propagation of the news of OBL’s death via Twitter

May 6, 2011
By
Propagation of the news of OBL’s death via Twitter

SocialFlow's blog has a great case study today on how news from a single tweet -- in this case, speculation made an hour before the President's announcement that Osama bin Laden had been killed -- can propagate through social networks. At 10:24 p.m. EST on Sunday May 1, Keith Urbahn tweeted: "So I'm told by a reputable person they...

Read more »

What value is cross country GDP correlation? [Part One]

May 6, 2011
By
What value is cross country GDP correlation? [Part One]

The above graph borders on chartjunk (and is nothing like Paul Butler’s amazing Facebook map). We can see some variation in color but mostly it is a set of lines between 152 country capitals with no means to determine which … Continue reading →

Read more »

Shell scripting EC2 for fun and profit

May 6, 2011
By
Shell scripting EC2 for fun and profit

Lately I’ve been doing some work with creating ad-hoc clusters of EC2 machines. My ultimate goal is to create a simple way to spin up a cluster of EC2 machines for use with Bryan Lewis’s very cool doRedis backend for the R foreach package. But that’s a whole other post. What I was scratching my

Read more »

Friday Function: nclass

May 6, 2011
By
Friday Function: nclass

When you draw a histogram, an important question is “how many bar should I draw?”. This should inspire an indignant response. You didn’t become a programmer to answer questions, did you? No. The whole point of programming is to let your computer do your thinking for you, giving you more time to watch videos of

Read more »

Running an R-based ABM in parallel on a Multicore Desktop

May 6, 2011
By

I've been running for the last couple of months a lot of simulations written in R on legion cluster  here at UCL. But I still do many things on our quad-core server here at the institute, and parallelising the simulations is extremely handy.S...

Read more »

Running an R-based ABM in parallel on a Multicore Desktop

May 6, 2011
By

I've been running for the last couple of months a lot of simulations written in R on legion cluster  here at UCL. But I still do many things on our quad-core server here at the institute, and parallelising the simulations is extremely handy.S...

Read more »

Extracting reflectance data from SpectraSuite JCAMP files in R

May 6, 2011
By
Extracting reflectance data from SpectraSuite JCAMP files in R

I've been using an OceanOptics USB4000 spectrometer in research on biomass accumulation and climate in South Africa. This post presents a R function that will read in JCAMP files from the SpectraSuite software and output a vector of reflectance values.  SpectraSuite can convert binary output files to JCAMP files if they weren't saved as JCAMP. You...

Read more »

Extracting reflectance data from SpectraSuite JCAMP files in R

May 6, 2011
By
Extracting reflectance data from SpectraSuite JCAMP files in R

I've been using an OceanOptics USB4000 spectrometer in research on biomass accumulation and climate in South Africa.This post presents a R function that will read in JCAMP files from the SpectraSuite software and output a vector of reflectance values.&...

Read more »

Is R an ideal language to teach the fundamentals of programming to beginners?

May 6, 2011
By
Is R an ideal language to teach the fundamentals of programming to beginners?

I’m helping out some colleagues learn programming from having zero experience with it in any shape or form. It’s quite a daunting task in some senses, because, well, it may not be easy! They are researchers, so they’ll need it for processing data and generating output, and perhaps processing BIG DATA at some point too.

Read more »

EC2 Micro instance of RStudio

May 5, 2011
By
EC2 Micro instance of RStudio

I wanted to see see if I could setup RStudio on a micro instance on Amazon EC2.  I thought it would be nice to have my own instance running in the cloud and why not use AWS free usage tier … Continue reading →

Read more »

BMS 0.3.0 Released

Version of 0.3.0 of the Bayesian Model Averaging package BMS has been released. Apart from numerous bugfixes, BMS 0.3.0 includes two main additions:The ability in bms to keep certain fixed regressors to be included in all sampled models The option t...

Read more »

Accessing MySQL through R

May 5, 2011
By

Connecting to MySQL is made very easy with the RMySQL package. To connect to a MySQL database simply install the package and load the library.install.packages("RMySQL")library(RMySQL)Connecting to MySQL:Once the RMySQL library is installed create a dat...

Read more »

Day #34 Detailing graphs

Today mostly existed in adding details or changing certain aspects of my graphs. For example, I had to turn around the y-axis on my levelplot, circleplot, … which wasn’t so easy at first. But after a bit of googling I found out I had to rev...

Read more »

Day #35 replacing characters

Today I had a meeting with Emmanuel. He is a guy from inside Janssen who is very good with R-scripts. He made a lot of great plots which I had to use for our reports. During the meeting we came to a conclusion that all the difficult R-scripting he did,...

Read more »