Downloading S&P 500 Data to R

The cornerstone of your analysis and quantitative trading algorithms are data. There are lots of different ways how to do it in R (depending of what your investment instruments are). Today I am going to download data from finance.yahoo which are stock prices of companies included in S&P 500 … Continue reading

Create a Web Crawler in R

Admittedly I am not the best R coder, and I certainly have a lot to learn, but the code at the link below should provide you with an example of how easy it is to create a very (repeat: very) basic web crawler in R.  If you wanted to do this in SPSS, and I have, , you would have to step outside of … Continue reading

Remove all rows of an R dataframe

I should have probably figured this out a long time ago, but as I get deeper into programming with R, I am finding the need to remove all rows from a dataframe.  I was making this alot harder than it had to be. your.df<- your.df[which(is.na(your.df$text)), ] Replace your.df with, your … Continue reading

Get up and running with R, Sweave, and LaTex

There are a lot of great references on the web on how to levarage LaTeX for reporting and presentations (beamer), but as someone who is completely new to R and reproducible research, I was having a pretty hard time figuring out simply what to do (what tools, where do you edit, etc.). Eclipse as a … Continue reading

biomaRt and GenomeGraphs: a worked example

As promised a few posts ago, another demonstration of the excellent biomaRt package, this time in conjunction with GenomeGraphs. Here’s what we’re going to do: Grab some public microarray data Normalise and get a list of the most differentially-expressed probesets Use biomaRt to fetch … Continue reading

Creating surface plots

A 3d wireframe plot is a type of graph that is used to display a surface – geographic data is an example of where this type of graph would be used or it could be used to display a fitted model with more than one explanatory variable. These plots are related to contour plots which are the two … Continue reading

Displaying data using level plots

A level plot is a type of graph that is used to display a surface in two rather than three dimensions – the surface is viewed from above as if we were looking straight down and is an alternative to a contour plot – geographic data is an example of where this type of graph would be used. … Continue reading