Re: [R] Combining data.frames

2022-03-19 Thread Bert Gunter
Merge by the common keys/column names is the default. Te question is likely what to do with rows that don't match. That's determined by 'all' settings, which the OP may already have figured out. On Sat, Mar 19, 2022, 7:16 PM Tom Woolman wrote: > I'm trying hard to take tonight off and avoid b

Re: [R] Combining data.frames

2022-03-19 Thread Jeff Newmiller
Then show your code so we can focus on what you haven't yet figured out. Have you read the examples in the merge help page? On March 19, 2022 6:23:02 PM PDT, Jeff Reichman wrote: >Evening Tom > >Yest I've been playing with the merge function. But haven't been able to >achieve what I need. Could

Re: [R] Combining data.frames

2022-03-19 Thread Jeff Reichman
Jeff This seems to work df3 <- merge(df1, df2, all = TRUE) When I use either of the by.x, by.y or all.x, all.y arguments I get really weard results. Simply using the code about appears to work thus far. -Original Message- From: Jeff Newmiller Sent: Saturday, March 19, 2022 8:51 PM

Re: [R] Combining data.frames

2022-03-19 Thread Jeff Reichman
Yes I'm reading that presently The closest I've gotten has been df3 <- merge(df1, df2, all = TRUE) -Original Message- From: Tom Woolman Sent: Saturday, March 19, 2022 8:27 PM To: reichm...@sbcglobal.net Cc: r-help@r-project.org Subject: Re: [R] Combining data.frames You can also do "S

Re: [R] Combining data.frames

2022-03-19 Thread Tom Woolman
Have you looked at the merge function in base R? https://www.rdocumentation.org/packages/base/versions/3.6.2/topics/merge On 2022-03-19 21:15, Jeff Reichman wrote: R-Help Community I'm trying to combine two data.frames which each containing 10 columns of which they each share two common fiel