Hi, I can't find 'collapse' in the help of apply. Can somebody let me know where its document is? What is 'collapse' for?> x=matrix(1:6,nr=2) > apply(x,1,paste,collapse=',')[1] "1,3,5" "2,4,6">Regards, Peng
On Sep 16, 2009, at 5:15 PM, Peng Yu wrote:> > I can't find 'collapse' in the help of apply. Can somebody let me know > where its document is? What is 'collapse' for? > >> x=matrix(1:6,nr=2) >> apply(x,1,paste,collapse=',') > [1] "1,3,5" "2,4,6" >collapse is a parameter to paste. apply accepts ... arguments which it passes along to function it calls. David Winsemius, MD Heritage Laboratories West Hartford, CT