Re: [R] match in dependence of 2 columns

2013-02-14 Thread arun
NA #2  1  Mer    80 #3  1 Pold    NA #or join(dat1,dat2[,c("cu.nr.","name")],by=c("cu.nr.","name"),type="right") A.K. ----- Original Message - From: Mat To: r-help@r-project.org Cc: Sent: Thursday, February 14, 2013 2:03 AM Subject

Re: [R] match in dependence of 2 columns

2013-02-14 Thread Rui Barradas
Hello, You can do something like this: join(dat1, dat2[, c("cu.nr", "name", "value")], by=c("cu.nr.","name"),type="right") Hope this helps, Rui Barradas Em 14-02-2013 07:03, Mat escreveu: thank you, this code works: library(plyr) join(dat1,dat2,by=c("cu.nr.","name"),type="right") but my

Re: [R] match in dependence of 2 columns

2013-02-13 Thread Mat
thank you, this code works: library(plyr) join(dat1,dat2,by=c("cu.nr.","name"),type="right") but my dat2 frame has a lot of columns, which i don't want to match. How can i say, that only the column "value" should be match to dat1 ? Thank you. Mat -- View this message in context: http://r.

Re: [R] match in dependence of 2 columns

2013-02-13 Thread Rui Barradas
Hello, Try the following. data.frame1 <- read.table(text = " cu.nr. name value A 1 Evo 100 B 1 Mer 80 C 2 Ford50

Re: [R] match in dependence of 2 columns

2013-02-13 Thread John Kane
-project.org > Subject: [R] match in dependence of 2 columns > > Hello, > > i want to match a column of one data.frame to another, my problem is, > that i > only want to match the data, if 2 columns are equal. > > i have a example: > > data.frame1 >

[R] match in dependence of 2 columns

2013-02-13 Thread Mat
Hello, i want to match a column of one data.frame to another, my problem is, that i only want to match the data, if 2 columns are equal. i have a example: data.frame1 cu.nr. name value A 1 Evo 100 B