Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
R: st: combine two datasets
From
"Carlo Lazzaro" <[email protected]>
To
<[email protected]>
Subject
R: st: combine two datasets
Date
Thu, 19 Dec 2013 13:57:00 +0100
游万海 may want to consider:
----------------------------------------------------------------------------
------------------------------------------
append using "C:\Users\user\Desktop\dataset_B.dta" "C:\Users\user\Desktop\
dataset_A.dta"
sort id year
----------------------------------------------------------------------------
--------------------------------------
Kind regards,
Carlo
-----Original Message-----
From: 游万海
Sent: Thursday, December 19, 2013 1:53 PM
To: [email protected]
Subject: st: combine two datasets
Dear all,
I have two dataset A and B,
A:
id year var1 var2
1 2001 1 2
1 2002 3 4
1 2003 5 6
2 2001 1 2
2 2002 3 4
2 2003 5 6
3 2001 1 2
3 2002 3 4
3 2003 5 6
B:
id year var1 var2
1 2004 1 2
2 2004 3 4
3 2004 5 6
And I want to obtain the dataset C
id year var1 var2
1 2001 1 2
1 2002 3 4
1 2003 5 6
1 2004 1 2
2 2001 1 2
2 2002 3 4
2 2003 5 6
2 2004 3 4
3 2001 1 2
3 2002 3 4
3 2003 5 6
3 2004 5 6
Thanks very much
Bests,
wanhaiyou
Hunan University
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/