Re: [R] Combining data.frames

2022-03-20 Thread Rui Barradas
bc123","abc456","abc123","abc789","abc890","w12345")), event = as.factor(c("shoting","ied","protest","riot","protest","killing"))) df1 df2 #df3 <- merge(df1, df2

Re: [R] Combining data.frames

2022-03-19 Thread Bert Gunter
tax issue - wrong "all" argument (I > > think) > > > > -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:

Re: [R] Combining data.frames

2022-03-19 Thread Jeff Newmiller
what I need. Could maybe the way to to and it might be my syntax > >-Original Message- >From: Tom Woolman >Sent: Saturday, March 19, 2022 8:20 PM >To: reichm...@sbcglobal.net >Cc: r-help@r-project.org >Subject: Re: [R] Combining data.frames > >Have you looked at

Re: [R] Combining data.frames

2022-03-19 Thread Jeff Reichman
:51 PM To: reichm...@sbcglobal.net; Jeff Reichman ; 'Tom Woolman' Cc: r-help@r-project.org Subject: Re: [R] Combining data.frames 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, J

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

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

Re: [R] combining data.frames with is.na & match (), two questions

2019-04-23 Thread PIKAL Petr
llow oblong 0.0 100 3 kiwi green round 0.0 NA 4 orange orange round 1.0 NA 5 pear green pear 0.5 100 Cheers Petr > -Original Message- > From: R-help > mailto:r-help-boun...@r-project.org>> On Behalf > Of Drake Gossi > Sent: Thursday, Apr

Re: [R] combining data.frames with is.na & match (), two questions

2019-04-18 Thread Eric Berger
pe Juice Calories > 1 banana yellow oblong 0.0 100 > 2 pear green pear 0.5 100 > 3 mango NA 200 > > or just values from data frame with colours > > > merge(fr2, fr1, all.x=T) >Fruit Color Shape Juice Calories > 1 applered rou

Re: [R] combining data.frames with is.na & match (), two questions

2019-04-18 Thread PIKAL Petr
ll.x=T) Fruit Color Shape Juice Calories 1 applered round 1.0 NA 2 banana yellow oblong 0.0 100 3 kiwi green round 0.0 NA 4 orange orange round 1.0 NA 5 pear green pear 0.5 100 Cheers Petr > -Original Message- > F

Re: [R] combining data.frames with is.na & match (), two questions

2019-04-18 Thread peter dalgaard
The whole thing is a merge operation, i.e. > FruitNutr <- read.table(text=" + Fruit Calories + 1 banana 100 + 2 pear 100 + 3 mango 200 + ") > FruitData <- read.table(text=" + Fruit Color Shape Juice + 1 apple red round 1 + 2 banana yellow oblong 0 + 3 pear green pear 0.5 + 4 orange orange round

Re: [R] combining data.frames with is.na & match (), two questions

2019-04-18 Thread Michael Dewey
Dear Drake See in-line comments On 18/04/2019 00:24, Drake Gossi wrote: Hello everyone, I'm working through this book, *Humanities Data in R* (Arnold & Tilton), and I'm just having trouble understanding this maneuver. In sum, I'm trying to combine data in two different data.frames. This

[R] combining data.frames with is.na & match (), two questions

2019-04-17 Thread Drake Gossi
Hello everyone, I'm working through this book, *Humanities Data in R* (Arnold & Tilton), and I'm just having trouble understanding this maneuver. In sum, I'm trying to combine data in two different data.frames. This data.frame is called fruitNutr Fruit Calories 1 banana 100 2 pear 100 3 mango