Monthly Archives: October 2012

Making Color Ramps in Matlab

October 9, 2012
By

When visualizing an array of data in a heatmap, a good color map makes a world of difference.Thanks to my work in 'omics (i.e. transcriptomics - microarrays and RNASeq) I've looked at a lot of heatmaps over the past couple of years, and generated quite...

Read more »

A brief script on Geographical data analysis in R

A brief script on Geographical data analysis in R

I saw this post and I decided to replicated that good example but with data closer to me, particulary data of my country. So, I've got the shape data of the capital of my country (You can download the data from here). The data comes from the 2002 CENSO...

Read more »

Permanent Portfolio – Transaction Cost and better Risk Parity

October 9, 2012
By
Permanent Portfolio – Transaction Cost and better Risk Parity

I want to address comments that were asked in my last post, Permanent Portfolio – Simple Tools, about Permanent Portfolio strategy. Specifically: The impact of transaction costs on the perfromance and Create a modified version of risk allocation portfolio that distributes weights across 3 asset classes: stocks(SPY), gold(GLD), and treasuries(TLT), and only invests into cash(SHY)

Read more »

Revised graph for BAC 1% cash rewards

October 9, 2012
By
Revised graph for BAC 1% cash rewards

Thanks to Anthony Damico who alerted me to an error in the Bank of America's 1% cash rewards figure in my last post. The plot shows the true reward percentage as a function of purchase amount. A key "feature" of the BoA reward program is that the full 1% is only awarded for purchases in

Read more »

Age-Period-Cohort models and the decline of violence

October 9, 2012
By
Age-Period-Cohort models and the decline of violence

Ever since the end of the Mexican Revolution and the Cristero War violence in Mexico inched down in fits and starts from a high of about 60 homicides per 100,000 people to its lowest level sometime during the middle of the last decade (there's some uncertainty about the number of homicides in...

Read more »

R User Group Sponsorship: Applications open for 2013

October 9, 2012
By

Here at Revolution Analytics, we're proud to have been a part of fostering local user groups for R users around the world. Last year we sponsored more than 40 groups, with representation from every continent around the world. And we're thrilled to see the continued growth in user groups: this time last year there about 50 R user groups;...

Read more »

Git Error when pushing with a large file

October 9, 2012
By

Quick Note: I had an error recently where RStudio nor EGit nor the command line would push my repo to github.  I can't remember the exact error, although after some googling I found this SO answer that solved it git config http.postBuffer 52428800...

Read more »

Error Handling in R

October 9, 2012
By
Error Handling in R

It’s often the case that I want to write an R script that loops over multiple datasets, or different subsets of a large dataset, running the same procedure over them: generating plots, or fitting a model, perhaps. I set the script running and turn to another task, only to come back later and find theRelated posts:

Read more »

Debugging parameter mismatch across RAC database instances with R, dba_hist, and gv$parameter

October 9, 2012
By
Debugging parameter mismatch across RAC database instances with R, dba_hist, and gv$parameter

Did you find this post useful?  Does your organization need Oracle services?  We can help.   Much of this morning went into investigating strange ADDM reports on a two-node Oracle RAC database.  For some reason, there were statistically improbable differences…Read more ›

Read more »

Conditional Colors and Shapes in plot() with ifelse()

October 9, 2012
By
Conditional Colors and Shapes in plot() with ifelse()

Here’s an example of how to color your plot shapes and pch using an ifelse() statement. Ifelse() is handy as it creates an easy way to branch a function. The syntax is: ifelse(logical.condition, option1, option2). Meaning, if the logical condi...

Read more »