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]
AW: st: AW: combining datasets
From
"Martin Weiss" <[email protected]>
To
<[email protected]>
Subject
AW: st: AW: combining datasets
Date
Wed, 18 Aug 2010 15:48:00 +0200
<>
Try this:
*************
clear*
//create three files
forv i=1/3{
drop _all
set obs 5
gen byte id=`i'
gen var=rnormal()<.5
save file`i', replace
}
//let`s see
dir file?.dta
//open one of them
u file1, clear
//see contents
list, noo
//-append- the other two
append using file2.dta file3.dta
//see result
list, noo sepby(id)
*************
HTH
Martin
-----Ursprüngliche Nachricht-----
Von: [email protected]
[mailto:[email protected]] Im Auftrag von martine etienne
Gesendet: Mittwoch, 18. August 2010 15:42
An: [email protected]
Betreff: Re: st: AW: combining datasets
...well the unique identifiers are id variables, i guess i want to know
which is
a better method, I don't want to lose the unique ids
----- Original Message ----
From: Martin Weiss <[email protected]>
To: [email protected]
Sent: Wed, August 18, 2010 9:34:34 AM
Subject: st: AW: combining datasets
<>
Hard to say in the absence of further information. Are these unique
identifiers variables? You really need to make up your mind whether you want
to -append- or -merge-... See their respective help files for examples...
HTH
Martin
-----Ursprüngliche Nachricht-----
Von: [email protected]
[mailto:[email protected]] Im Auftrag von martine etienne
Gesendet: Mittwoch, 18. August 2010 15:27
An: [email protected]
Betreff: st: combining datasets
Dear Statalisters,
I have several small datasets (about 700-1000) each, with unique identifiers
for
each. I would like to join or merge these datasets but keep their individual
identifiers, is there a way that I can do that?
thanks
martie
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/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/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/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/statalist/faq
* http://www.ats.ucla.edu/stat/stata/