Monthly Archives: November 2012

ggplot graphs in publications?

November 6, 2012
By
ggplot graphs in publications?

The grey background and/or default choice of colours for groups makes a ggplot graph stand out to any R user when seen in a presentation. But ggplot graphs get all ninja when it comes to publications, either that or not … Continue reading →

Read more »

Forest plots in R (ggplot) with side table

November 6, 2012
By
Forest plots in R (ggplot) with side table

A friend asked me to help with a forest plot recently. After chatting about what she wanted the end result to look like, this is what I came up with. grid.arrange(data_table, p, ncol=2) ## Warning: Removed 1 rows containing missing … Continue reading →

Read more »

analyze the national survey on drug use and health (nsduh) with r

November 6, 2012
By

the national survey on drug use and health (nsduh) monitors illicit drug, alcohol, and tobacco use with more detail than any other survey out there.  if you wanna know the average age at first chewing tobacco dip, the prevalence of needle-sharing,...

Read more »

Simulating Multiple Asset Paths in R

November 5, 2012
By
Simulating Multiple Asset Paths in R

I recently came across the Optimal Rebalancing Strategy Using Dynamic Programming for Institutional Portfolios by W. Sun, A. Fan, L. Chen, T. Schouwenaars, M. Albota paper that examines the cost of different rebablancing methods. For example, one might use calendar rebalancing: i.e. rebalance every month / quarter / year. Or one might use threshold rebalancing:

Read more »

Quick Post About Getting and Plotting Polls in R

November 5, 2012
By
Quick Post About Getting and Plotting Polls in R

With the election nearly upon us, I wanted to share an easy way I just found to download polling data and graph a few with ggplot2. dlinzer at github created a function to download poll data from the Huffington Post's Pollster API.The default is to dow...

Read more »

Another look at ideology of the US congress

November 5, 2012
By
Another look at ideology of the US congress

In response to last week's post on the rapidly increasing ideology of the US Republican Party, Mike Lawrence suggested another way of looking at the DW-NOMINATE ideology data. Rather than simply looking at boxplots of the congress scores by party over time, we could fit a smooth curve to get a better sense of the trends over time. Mike...

Read more »

RInside 0.2.9

November 5, 2012
By

A new version 0.2.9 of RInside arrived on CRAN earlier today; Windows binaries have already been built too. RInside provides a set of convenience classes which facilitate embedding of R inside of C++ applications and programs, using the classes and ...

Read more »

OOP with Rcpp modules

November 5, 2012
By
OOP with Rcpp modules

The purpose of Rcpp modules has always been to make it easy to expose C++ functions and classes to R. Up to now, Rcpp modules did not have a way to declare inheritance between C++ classes. This is now fixed in the development version, and t...

Read more »

Network visualization in R with the igraph package

November 5, 2012
By
Network visualization in R with the igraph package

In this post I showed a visualization of the organizational network of my department. Since several people asked for details how the plot has been produced, I will provide the code and some extensions below. The plot has been done … Continue reading →

Read more »

If we truly want to foster collaboration, we need to rethink the “independence” criteria during promotion

November 5, 2012
By

When I talk about collaborative work, I don’t mean spending a day or two helping compute some p-values and end up as middle author in a subject-matter paper. I mean spending months working on a project, from start to finish, with experts … Continue reading →

Read more »