Search This Blog

Saturday 7 May 2011

R data tricks : merging and joining

rbind and cbind join files respectively as if they were stacked on top of each other - bind by row - and as if they were placed side by side - bind by column.

merge allows you to join datasets on shared columns. remember to specify by = list of fields on which to join, and all=TRUE if you want to include rows in which no union took place.

No comments:

Post a Comment