Other sites

Data manipulations

In the last Utah R Users group meeting I gave a presentation on data manipulations on R, and today I found through the plyr mailing list two commands that I was previously unaware of that should definitely be made mention of.

arrange

I was very pleased to find arrange because it fills the nagging hole for sorting data frames. Calling

because it’s understandable by practically anyone, and when your code is understandable there is less chance of mistakes.

mutate

mutate is not that different from transform, but I have to make the confession that when I was setting things up for my presentation I tried to see if transform could do the things that mutate does. mutate can include previously defined variables in later defined variables. I quote from the mutate help file,