Dear r-users,
Suppose I have three datasets:
Dataset-1:
Date x y
Jan-1,2005 120 230
Jan-2,2005 123 -125
Jan-3,2005 -110 300
Jan-4,2005 114 -21
Jan-7,2005 11 299
Mar-5,2005 200 311
Dataset-2:
Date x y
Jan-2,2005 123 -125
Jan-3,2005 -110 300
Jan-4,2005 114 -21
Jan-5,2005 11 299
Jan-6,2005 -23 12
Mar-5,2005 200 311
Dataset-3:
Date x y
Jan-3,2005 -110 300
Jan-4,2005 114 -21
Jan-5,2005 11 299
Mar-5,2005 200 311
Apl-23,2005 123 200
Now I want to get the common dates along with x and y from this above three
datasets keeping the same order
in date-variable as it is.
For ex. I want to get:
Date x y x y
x y
(from dataset-1) (from dataset-2) (from
dataset-3)
------------------------------------------------------------------------------------------------
Jan-3,2005 -110 300 -110 300 -110
300
Jan-4,2005 114 -21 114 -21 114
-21
Mar-5,2005 200 311 200 311 200 311
Can anyone give me any R code to implement this for any number of datasets ?
Thanks and regards
thanks in advance
---------------------------------
[[alternative HTML version deleted]]
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html