Re: [R] merge in function

2007-12-07 Thread John Kane
I think we need some actual sample code . Also by= 0 seems a bit funny. --- qian z [EMAIL PROTECTED] wrote: I used merge() in a function, but it doesn't return correct data frame. add.name - function(data, x) { ... ... newfile - merge(data, resid, by =0,

Re: [R] merge in function

2007-12-06 Thread Marc Schwartz
On Thu, 2007-12-06 at 09:27 -0800, qian z wrote: I used merge() in a function, but it doesn't return correct data frame. add.name - function(data, x) { ... ... newfile - merge(data, resid, by =0, all.x=TRUE, all.y= FALSE) newfile } You are