Re: [R] create function for compare two dataframe.

2016-02-29 Thread Hiroyuki Sato
t 2 2 2 > > $ VAL3: int 3 3 2 > > > > That is why dput(s1) is always preferable for exchanging data instead of > text in ***HTML formated*** mail. > > > > Cheers > > Petr > > > > > > *From:* Hiroyuki Sato [mailto:hiroys...@gmail.com] >

Re: [R] create function for compare two dataframe.

2016-02-29 Thread PIKAL Petr
is always preferable for exchanging data instead of text in ***HTML formated*** mail. Cheers Petr From: Hiroyuki Sato [mailto:hiroys...@gmail.com] Sent: Monday, February 29, 2016 12:04 PM To: PIKAL Petr; r-help@r-project.org Subject: Re: [R] create function for compare two dataframe. Hello Petr. T

Re: [R] create function for compare two dataframe.

2016-02-29 Thread Hiroyuki Sato
Hello Petr. Thank you for replying. Your step is better than my step!. I added one step > s.dcast <- dcast(s.m, ID+variable~dat) > subset(s.dcast,df1!=df2) ID variable df1 df2 1 ID1 VAL1 2 0 5 ID2 VAL2 3 2 9 ID3 VAL3 4 2 This output is what I wanted!!. P.S. When I

Re: [R] create function for compare two dataframe.

2016-02-29 Thread PIKAL Petr
Hi You does not need to create function, you can use functions already available. > s1<- read.table("clipboard", header=T, sep=",") > s2<- read.table("clipboard", sep=",") You presented second table without names. > names(s2) <- names(s1) > s1 ID VAL1 VAL2 VAL3 1 ID1223 2 I