Converting MATLAB and R date and time values

February 20, 2011
By

For some unknown reason, MATLAB codes its date/time values as the number of elapsed days starting from January 1 in the year 0000. R uses the equally arbitrary, but much more widespread POSIX/Unix epoch as a reference for time keeping, so that R’...

Read more »

Vectorize!

February 20, 2011
By
Vectorize!

Here is an email sent by one of my students a few days ago: Do you know how to integrate a function with an  “if”? For instance: >X=rnorm(100) >Femp=function(x){ +   return(sum(X<x)) +} >integrate(Femp,0,1)$value does not work. My reply was that the fundamental reason it does not work is that integrate (or curve for instance)

Read more »

Dataset: Tweets from the Chinese Protests #cn220

February 20, 2011
By
Dataset: Tweets from the Chinese Protests #cn220

  Earlier this week, I posted a ~100k tweet dataset on the #25bahman protests in Iran.  The corresponding figure of frequencies showed a strong presence on Twitter, with over 500 tweets per 5 minute period at peak.  You can download the … Continue reading →

Read more »

New R features in Bio7 1.5

February 20, 2011
By
New R features in Bio7 1.5

Bio7 1.5 has been released and comes with new functionalities for R. For all who don’t know Bio7 here is a short description: Bio7 is a integrated development environment for ecological modelling based on the Rich-Client-Platform concept of the Java IDE Eclipse. The Bio7 platform contains several perspectives which arrange several views for a special

Read more »

UseR! 2011 in Warwick

February 20, 2011
By
UseR! 2011 in Warwick

This year useR! conference will take place in Warwick, on August 16-18.  It is being organised by the department of Statistics and funded by CRiSM and Revolution Analytics (providers of the R tee-shirt!). I wish I could attend but mid-August is usually associated with genuine (post-JSM) family vacations. Filed under: R, Statistics, University life Tagged:

Read more »

Talking R through Java

February 20, 2011
By
Talking R through Java

Today I played a bit with JRI as part of rJava, a Java-R-interface. Here you can learn how to setup for Debian/Ubuntu/akins.

Read more »

Open-sourcing some of my automation code

February 19, 2011
By
Open-sourcing some of my automation code

To automate my trading I use a mix of scripts. Everything goes – R, Python, shell, C++, etc. For some time now I have been satisfied with the tools I have created. They run once a day, gather data from EODDATA, update the database, run some R magic to decide what needs to be done

Read more »

Software tools for data analysis – an overview

February 19, 2011
By
Software tools for data analysis – an overview

by Szilard Pafka Discussions on various software tools (C, C++, Perl, Python, Unix shell, R, Matlab, SAS, SPSS, Excel, databases, Hadoop etc.) used in data analysis. Szilard Pafka (founder and co-organizer of the Los Angeles R users group) presents an … Continue reading →

Read more »

Parallel computation [permutations]

February 19, 2011
By
Parallel computation [permutations]

François Perron is visiting me for two months from Montréal and, following a discussion about the parallel implementation of MCMC algorithms—to which he also contributed with Yves Atchadé in 2005—, he remarked that a deterministic choice of permutations with the maximal contrast should do better than random or even half-random permutations. Assuming p processors or

Read more »

Screen Scraping, Mapping in R

February 19, 2011
By

by Earl F. Glynn, Kansas Watchdog The PowerPoint slides below give an overview of screen scraping and mapping in R. Details with comments about many of the R statements can be found in these articles: Simple R Screen Scraping Example R Screen Scraping:...

Read more »

Working with multiple graphs in R

February 19, 2011
By
Working with multiple graphs in R

I'm trying out screencasting to help illustrate some tips and tricks with the statistics software package R, but also to hone my skills in this area.I'm including the code for this example as an attachment to this post.I'm in the proces...

Read more »

R Bloggers: The Site I Wish Existed in 2007

February 19, 2011
By
R Bloggers: The Site I Wish Existed in 2007

  My first experience with R was in 2007 as a sophomore in undergrad.  As part of a larger project on pricing day-ahead electricity futures, I wanted to cluster locational marginal price (LMP) data from the ISO-NE.  Something like k-means is easy … Continue reading →

Read more »

IBM has a Natural Language Purpose

February 19, 2011
By

I wanted to write a blog post about the advancements of Natural Language Processing in light of the performance of IBM's Watson on the Jeopardy challenge last week.  Natural Language Processing is the science of transforming and interpreting human...

Read more »

IBM has a Natural Language Purpose

February 19, 2011
By

I wanted to write a blog post about the advancements of Natural Language Processing in light of the performance of IBM's Watson on the Jeopardy challenge last week.  Natural Language Processing is the science of transforming and interpreting human...

Read more »

RcppArmadillo 0.2.13

February 19, 2011
By

Yesterday Conrad Sanderson released version 1.1.4 of his Armadillo templated C++ library for linear algebra, so hot on the heels our 0.2.12 release from a few days ago comes version 0.2.13 of RcppArmadillo, our Rcpp-based integration into R. This new...

Read more »

Readability vs speed in R

February 19, 2011
By

I have bad news for those of you trying to produce lucid code!

Read more »

Analysis and Mapping of Kansas Judicial Retention Elections by County Using R

February 19, 2011
By

by Earl F. Glynn, Kansas Watchdog This article describes how the data obtained from scraping 105 pages of county election data were analyzed and mapped using R. Background The Kansas Secretary of State published Nov. 2010 election results online, inclu...

Read more »

R Reshape Examples

February 19, 2011
By

by Earl F. Glynn, Kansas Watchdog The goal of this article is to describe how to “reshape” data from screen scraping to make analysis with existing tools easier. Background The Kansas Secretary of State published Nov. 2010 election results ...

Read more »

R Screen Scraping: 105 Counties of Election Data

February 18, 2011
By

by Earl F. Glynn, Kansas Watchdog The goal of this article is to show how to visit 105 online web pages programmatically and “scrape” data from them to form a statewide summary of election data in Kansas. An earlier article gave details of ...

Read more »

Aligning labels in circular igraph layouts

February 18, 2011
By
Aligning labels in circular igraph layouts

The folks at IPE at UNC have produced this nice animated gif of some network data on increasing financial integration in the run-up to the 2008 crisis. They used a small trick I pointed to a while ago (just using a pipe, nothing fancy) that lets you ...

Read more »

Aligning labels in circular igraph layouts

February 18, 2011
By
Aligning labels in circular igraph layouts

The folks at IPE at UNC have produced this nice animated gif of some network data on increasing financial integration in the run-up to the 2008 crisis. They used a small trick I pointed to a while ago (just using a pipe, nothing fancy) that lets you generate the gif from within R without tediously

Read more »

Accessing NOAA tide data with R

February 18, 2011
By

Here's some R code that can be used to download archived tide height data from NOAA's CO-OPS OPeNDAP server. The code makes use of RCurl to send a URL query to the server, and then splits apart the resulting data into a data frame.

Read more »

Simple R Screen Scraping Example

February 18, 2011
By

by Earl F. Glynn, Kansas Watchdog The goal of this exercise is to show how to “screen scrape” data from an online web page using R. Additional articles will extend this example to scrape data from 105 Kansas county pages to form a statewide...

Read more »

Some R Package Updates

February 18, 2011
By

Packages for R are being added and updated so frequently now that it's tough to keep up with them all (the @CRANberriesFeed Twitter feed helps, though). But here are a couple of recent package updates that caught my eye: The Rcpp package for seamless integration between R and C++ has been updated. While most of the changes are under...

Read more »

Consuming RdotNET

February 17, 2011
By

In my explorations with R, Mathematica, FreeMat, MatLab, and RapidMiner (now with R support! Yay!), I’m seeing integration of R to be quite useful in building a trading app, as technical analysis is one of R’s fortés. For the sake of brevity, I’m including comments in the code instead of using paragraphs…use the source, Luke.Note that I'm not using...

Read more »

Consuming RdotNET

February 17, 2011
By
Consuming RdotNET

In my explorations with R, Mathematica, FreeMat, MatLab, and RapidMiner (now with R support! Yay!), I’m seeing integration of R to be quite useful in building a trading app, as technical analysis is one of R’s fortés. For the sake of brevity, I’...

Read more »

Damn scoping in R

February 17, 2011
By

Ok, R is very well-considered in certain respects, but there are also some things annoying me... This time it's scoping...

Read more »

Backtesting in Excel and R

February 17, 2011
By

This post is the introduction to a series that will illustrate how to backtest the same strategy in Excel and R.  The impetus for this series started with this tweet by Jared Woodard at Condor Options.  After Soren Macbeth introduced us, Jare...

Read more »

Backtesting in Excel and R

February 17, 2011
By

This post is the introduction to a series that will illustrate how to backtest the same strategy in Excel and R.  The impetus for this series started with this tweet by Jared Woodard at Condor Options.  After Soren Macbeth introduced us, Jare...

Read more »