Thank you so much.. it worked well correctly..
--
View this message in context:
http://r.789695.n4.nabble.com/finding-duplicates-in-a-data-frame-tp4633231p4633324.html
Sent from the R help mailing list archive at Nabble.com.
[[alternative HTML version deleted]]
_
Cc:
Sent: Wednesday, June 13, 2012 6:16 AM
Subject: [R] finding duplicates in a data frame
I have two data frames which has 3 columns each.My first data frame is large
like this below
"new.col ppm.p. freq.p."
"1_3_diaminopropane 3.13859 5.67516"
"1_3_diaminopropan
Hello,
Thanks! Now we can see that your df1 only has one column, your dataset
was messed up in some previous step. So, it needs to be transformed into
a 3 columns data.frame first. Then use merge().
x <- levels(df1$new.col.ppm.p..freq.p.)[df1$new.col.ppm.p..freq.p.]
x <- t(sapply(x, functio
On Wed, Jun 13, 2012 at 03:16:57AM -0700, sathya7priya wrote:
> I have two data frames which has 3 columns each.My first data frame is large
> like this below
> "new.col ppm.p. freq.p."
> "1_3_diaminopropane 3.13859 5.67516"
> "1_3_diaminopropane 3.137 6.65388"
> "1_3_diaminopropane 3.13541 8.0142"
What are the names of your data.frames columns? Paste the output of the
following commands in a post:
dput(head(df1, 30))
dput(head(df2, 30))
Tui Barradas
Em 13-06-2012 12:55, Sathya Priya escreveu:
I got this error while trying your code.. Can you please sort it out
Error in fix.by(by.x, x)
Hello,
Try
merge(df1, df2, by.x=c("ppm.p.", "freq.p."), by.y=c("ppm.p.", "freq.p."))
ppm.p. freq.p. new.col.x new.col.y
1 4.81412 105.1100 1_amino_1_phenylmethyl_phosphonic_acid unknown
2 7.44687 7.1684 1_amino_1_phenylmethyl_phosphonic_acid unknown
where
I have two data frames which has 3 columns each.My first data frame is large
like this below
"new.col ppm.p. freq.p."
"1_3_diaminopropane 3.13859 5.67516"
"1_3_diaminopropane 3.137 6.65388"
"1_3_diaminopropane 3.13541 8.0142"
"1_3_diaminopropane 3.13383 9.64184"
"1_3_diaminopropane 3.12075 298.243"
7 matches
Mail list logo