Skip to content
Back to formatted view

Raw Message

Message-ID: <1336659303169-4623624.post@n4.nabble.com>
Date: 2012-05-10T14:15:03Z
From: Rui Barradas
Subject: Interweaving of two datasets
In-Reply-To: <1336639888330-4622912.post@n4.nabble.com>

Hello,

What doesn't work, exactly?
I can only see two things:

1. The order of the columns is different, first data.frame in merge
instruction comes first.
    Solution: reverse the order of data.frames in merge.
2. The order of the rows is different, the merge function orders it's output
by the common col(s).
    Solutions: leave as is or use 'order'.

# first is the first sheet in attached .xls file, second is the second and
result is the third.
# 1.
res2 <- merge(second, first)

# 2.
result[order(result$name, result$request), ]
res2[order(res2$name, res2$request), ]

If this isn't it, please state what the problem is,  "doesn't work" is a bit
vague.

Hope this helps,

Rui Barradas



lunarossa wrote
> 
> it doesn't work.
> Find attached what I need explained in xls.
> Thank you very very much!
> 
> http://r.789695.n4.nabble.com/file/n4622912/interweaving_of_2_datasets.xls
> interweaving_of_2_datasets.xls 
> 


--
View this message in context: http://r.789695.n4.nabble.com/Interweaving-of-two-datasets-tp4608505p4623624.html
Sent from the R help mailing list archive at Nabble.com.