Re: [R] meaning of formula in aggregate function

2011-01-23 Thread Den
Dear Peter Thank you Lo and behold Now I've got it In code aggregate(.~ id, lapply(df, as.character), FUN = function(x)paste(sort(x), collapse = ''), na.action = na.pass) there are no contradictions with NAs. na.action = na.pass is applied to aggregate where default is na.omit. And afterwards th

Re: [R] meaning of formula in aggregate function

2011-01-23 Thread P Ehlers
Den wrote: Dear Dennis Thank you very much for your comprehensive reply and for time you've spent dealing with my e-mail. Your kindly explanation made things clearer for me. After your explanation it looks simple. lapply with chosen options takes small part of cycle with same id (eg. df[df$id==

Re: [R] meaning of formula in aggregate function

2011-01-22 Thread Den
Dear Dennis Thank you very much for your comprehensive reply and for time you've spent dealing with my e-mail. Your kindly explanation made things clearer for me. After your explanation it looks simple. lapply with chosen options takes small part of cycle with same id (eg. df[df$id==3,"cycle2"] an

Re: [R] meaning of formula in aggregate function

2011-01-22 Thread P Ehlers
Den wrote: Dear R community Recently, dear Henrique Dallazuanna literally saved me solving one problem on data transformation which follows: (n_, _n, j_, k_ signify numbers) SOURCE DATA: id cycle1 cycle2 cycle3 … cycle_n 1 c c c c 1 m

[R] meaning of formula in aggregate function

2011-01-22 Thread Den
Dear R community Recently, dear Henrique Dallazuanna literally saved me solving one problem on data transformation which follows: (n_, _n, j_, k_ signify numbers) SOURCE DATA: id cycle1 cycle2 cycle3 … cycle_n 1 c c c c 1 m m m