Monthly Archives: August 2013

Tutorial: Parallel programming with foreach

August 30, 2013
By

Exegetic Analytics extols the wonders of foreach package for iterative operations that go beyond the standard "for" loop in R. For example, here's a neat (if not optimally efficient) construct using filters to calculate the primes less than 100: foreach(n = 1:100, .combine = c) %:% when (isPrime(n)) %do% n The open-source team at Revolution Analytics created the foreach...

Read more »

ECVP tutorial on classification images

August 30, 2013
By
ECVP tutorial on classification images

The slides for my ECVP tutorial on classification images are available here. Try this alternative version if the equations look funny. (image from Mineault et al. 2009) The slides are in HTML and contain some interactive elements. They’re the result of experimenting with R Markdown, D3 and pandoc. You write the slides in R Markdown,

Read more »

Making regex examples work for you!

August 30, 2013
By

One of the most frequently used string recognition algorithms out there is regex and R implements regex.  However, users can often be frustrated with how despite taking examples verbatim from many sources such as stackoverflow they do not seem to ...

Read more »

Knitr/Markdown OpenCPU App

August 30, 2013
By
Knitr/Markdown OpenCPU App

A new little OpenCPU app allows you to knit and markdown in the browser. It has a fancy pants code editor which automatically updates the output after 3 seconds of inactivity. It uses the Ace web editor with mode-r.js (thanks to RStudio for making the latter available). Like all OpenCPU apps, the source...

Read more »

Knitr/Markdown OpenCPU App

August 30, 2013
By

A new little OpenCPU app allows you to knit and markdown in the browser. It has a fancy pants code editor which automatically updates the output after 3 seconds of inactivity. It uses the Ace web editor with mode-r.js (thanks to RStudio for making the latter available). Like all OpenCPU apps, the source package lives in the opencpu app...

Read more »

Drafting the Best Starting Lineup in Fantasy Football by Taking into Account Uncertainty in the Projections: An Optimization Simulation

August 29, 2013
By
Drafting the Best Starting Lineup in Fantasy Football by Taking into Account Uncertainty in the Projections: An Optimization Simulation

In a previous post, I showed how to determine the best starting lineup to draft using an optimizer tool.  The optimizer identifies the players that maximize your projected points within your The post Drafting the Best Starting Lineup in Fantasy Football by Taking into Account Uncertainty in the Projections: An Optimization Simulation appeared first on Fantasy Football Analytics.

Read more »

Drafting the Best Starting Lineup in Fantasy Football by Taking into Account Uncertainty in the Projections: An Optimization Simulation

August 29, 2013
By
Drafting the Best Starting Lineup in Fantasy Football by Taking into Account Uncertainty in the Projections: An Optimization Simulation

In a previous post, I showed how to determine the best starting lineup to draft using an optimizer tool.  The optimizer identifies the players that maximize your projected points within your risk tolerance.  The optimizer does not take i...

Read more »

Plot Weekly or Monthly Totals in R

August 29, 2013
By
Plot Weekly or Monthly Totals in R

When plotting time series data, you might want to bin the values so that each data point corresponds to the sum for a given month or week. This post will show an easy way to use cut and ggplot2's stat_summary to plot month totals in R wi...

Read more »

A simple amortization function

August 29, 2013
By

I was working on a project yesterday where I needed to amortize out a bunch of loans to calculate the total interest a borrower would pay if he or she paid the minimum monthly payment for the full term of the loan. I couldn’t find any package in R that already contained the necessary math,

Read more »

R and Linear Algebra

August 29, 2013
By

by Joseph Rickert I was recently looking through upcoming Coursera offerings and came across the course Coding the Matrix: Linear Algebra through Computer Science Applications taught by Philip Klein from Brown University. This looks like a fine course; but why use Python to teach linear algebra? I suppose this is a blind spot of mine: MATLAB I can see....

Read more »