Monthly Archives: September 2012

Fitting an ellipse to point data

September 30, 2012
By
Fitting an ellipse to point data

Some time ago I wrote an R function to fit an ellipse to point data, using an algorithm developed by Radim Halíř and Jan Flusser1 in Matlab, and posted it to the r-help list. The implementation was a bit hacky, returning odd results for some data. A couple of days ago, an...

Read more »

An R-based Research Notebook – Test

September 30, 2012
By

The following are from Tom Torsney-Weir’s blog (here’s the repo).Simple MathJax and R example A more complex example with caching <!--begin.rcode test2,cache=TRUE x.vals <- runif(10) y.vals Another plotting example using ggplot <!--begin.rcode test3,cache=TRUE, message=FALSE library(ggplot2) c Example using googleVis <!--begin.rcode test4,cache=TRUE, message=FALSE, results='asis' suppressPackageStartupMessages(library(googleVis)) ## Table with embedded links PopTable

Read more »

Working with Bipartite/Affiliation Network Data in R

September 30, 2012
By
Working with Bipartite/Affiliation Network Data in R

Data can often be usefully conceptualized in terms affiliations between people (or other key data entities). It might be useful analyze common group membership, common purchasing decisions, or common patterns of behavior. This post introduces bipartite/affiliation network data and provides … Continue reading →

Read more »

Football, an ordinal model

September 30, 2012
By
Football, an ordinal model

On September 19th, flo2speak remarked under a post that his/her experience is that ordinal models had better performance. That seems reason enough to try, so there we are. In examining this type of model it is found that more complex models can be...

Read more »

Plot R Data With googleVis

September 30, 2012
By

Here is a little code snippet that shows how to do two things Use the Google Maps API to resolve place names into lat-long coordinate pairs. Plot R dataframes that contain lat-long data (for example from #1) onto Google Maps for quick visualization using the googleVis package.  The embedded map looks a little wonky here but it looks...

Read more »

Quantifying student feedback using Org mode and R

September 30, 2012
By
Quantifying student feedback using Org mode and R

As the term has progressed, my LSM2241 lectures are getting more consistent. I’m aiming to use 45 slides for what is officially a two hour lecture, although in reality it lasts about 90 minutes. We take a break at about 50 … Continue reading →

Read more »

my Facebook social network

September 29, 2012
By
my Facebook social network

I got very excited on making a network diagram of my Facebook network using Ghefi (https://gephi.org/) and submitted my first assignment for the Social Network Analysis course on https://www.coursera.org/. It's middle of the night, so I will ...

Read more »

Padding integers for use in filenames

September 29, 2012
By
Padding integers for use in filenames

If you’ve ever written code that generates a whole whack of files, you may have came across the following problem when processing them. Using a naming convention wherein files are numbered will  gum up any ordering which is based on string sorting (ls, for example). What you end up with is something like this: Which

Read more »

Merging Dataframes by Partly Matching String

September 29, 2012
By

The latest posting by Tony Hirst sparked my attention because I was thinking about a very similar issue recently.I was also fiddling around with agrep and adist until I realised that for this very issue matching of substrings is not as important as matching multiple words.. With this different approach I quite easily matched all but 3...

Read more »

Weekend Reading – Gold in October

September 28, 2012
By
Weekend Reading – Gold in October

I recently came across the “An early Halloween for gold traders” article by Mark Hulbert. I have discussed this type of seasonality analysis in my presentation at R/Finance this year. It is very easy to run the seasonality analysis using the Systematic Investor Toolbox. This confirms that October have been historically bad for Gold, but

Read more »