Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

RE: st: Merge datasets


From   "Andre pierre" <[email protected]>
To   [email protected]
Subject   RE: st: Merge datasets
Date   Sun, 09 Oct 2005 22:08:44 +0200

You can do
merge [varlist] using [filename], keep(varlist)

where varlist is the list of variables in "filename" you want to keep
See the "merge" option in the help files for further details



From: Jia Xiangping <[email protected]>
Reply-To: [email protected]
To: statalist <[email protected]>
Subject: st: Merge datasets
Date: Mon, 10 Oct 2005 03:46:54 +0800

Dear all,

I have dozens of datasets. Let's raise a example:

dataset A: id vara varb...vari..
dataset B: id varaa varbb...varj (i != j)

The variables in both of these two are different except the key
variable ID. The number of obsevations in both of these two sets are
also different. It's unbalanced.

Now I just want to infile (I'm not sure if this word is appropriate
here, maybe extract might be better) one or two variables in A to B,
with the same ID matched case to case. This can be done by merging
both of these two datasets. But some of the datasets are quite big
that my version can not support so many variables. So I'm wondering if
there are some other ways to extract some variables I need to my
targeted datasets.

Joe


--
Xiangping JIA

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/
_________________________________________________________________
10 Mo pour vos pi�ces jointes avec MSN Hotmail ! http://www.imagine-msn.com/hotmail/default.aspx?locale=fr-FR

*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/




© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index