data1$A[8]
#[1] 1.4
data2$A[15]
#[1] 1.4
data2$A[15]==data1$A[8]
#[1] FALSE
You can check these links:
http://r.789695.n4.nabble.com/Comparing-decimal-numbers-td3251437.html
http://rwiki.sciviews.org/doku.php?id=misc:r_accuracy
A.K.
>The FAQ says "Other numbers have to be rounded to (typically
HI,
Possibly R FAQ: 7.31
data1New<-data1
data1New$A<- round(data1New$A,2)
data2New<- data2
data2New$A<- round(data2New$A,2)
merge(data1New,data2New,by="A")
# A B C
#1 0.0 0.9 10.0
#2 1.1 0.6 11.1
#3 1.4 0.7 11.4
#4 3.1 0.4 13.1
#5 4.4 0.8 14.4
A.K.
Hello,
Lets say we have these
.org
[mailto:r-help-boun...@r-project.org] On Behalf Of
Cecilia Carmo
Sent: Sunday, August 22, 2010 10:24 AM
To: Erik Iverson
Cc: r-help@r-project.org; Hadley Wickham
Subject: Re: [R] problems with merge() - the output has
many
repeated lines
I have done
intersect(names(df1), names(df2))
[1] &q
At 18:23 22/08/2010, Cecilia Carmo wrote:
I have done
intersect(names(df1), names(df2))
[1] "firm" "year"
This is the key I used to merge
merge(df1,df2,by=c("firm","year"))
And there is just one row firm/year in df1 that
matches with another firm/year row in df2. Df1
has more firm/year rows t
?unique
--
View this message in context:
http://r.789695.n4.nabble.com/problems-with-merge-the-output-has-many-repeated-lines-tp2333596p2334249.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-project.org mailing list
https://
I have done
intersect(names(df1), names(df2))
[1] "firm" "year"
This is the key I used to merge
merge(df1,df2,by=c("firm","year"))
And there is just one row firm/year in df1 that matches
with another firm/year row in df2. Df1 has more firm/year
rows than df2, and them don't match with none in
Cecilia -
Find what columns you're matching on,
intersect(names(df1), names(df2)),
Maybe that will shed some light on the issue.
On 08/22/2010 12:02 PM, Cecilia Carmo wrote:
Thanks, but I don't have multiple matches and the lines repeated in the
final dataframe are exactly equal in all column
Thanks, but I don't have multiple matches and the lines
repeated in the final dataframe are exactly equal in all
columns.
Cecília
Sat, 21 Aug 2010 10:58:53 -0500
Hadley Wickham escreveu:
You may find a close reading of ?merge helpful,
particularly this
sentence: "If there is more than one
You may find a close reading of ?merge helpful, particularly this
sentence: "If there is more than one match, all possible
matches contribute one row each" (so check that you don't have
multiple matches).
Hadley
On Sat, Aug 21, 2010 at 10:45 AM, Cecilia Carmo wrote:
> Hi everyone,
>
> I have be
9 matches
Mail list logo