[R] splitting a factor column into binary columns for each factor

2010-01-26 Thread Chuck White
Yesterday I posted the following question (my apologies for not putting a subject line): =question== Hello -- I would like to know of a more efficient way of writing the following piece of code. Thanks. options(stringsAsFactors=FALSE) orig <- c(rep('11

[R] splitting a factor column into binary columns for each factor

2010-01-26 Thread Chuck White
Yesterday I posted the following question (my apologies for not putting a subject line): =question== Hello -- I would like to know of a more efficient way of writing the following piece of code. Thanks. options(stringsAsFactors=FALSE) orig <- c(rep('11