Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Keep data according to one data file's varlist,

From   daniel klein <>
Subject   Re: st: Keep data according to one data file's varlist,
Date   Thu, 8 Nov 2012 13:13:24 +0100

Obviously, you cannot load all variables in either dataset (assuming
data1 is the larger and the error occurs when loading data2).

If you are using Stata SE (you do not tell us) -set maxvar- to 32000
and try again (see -help memory-). As outlines in a recent thread
( there
is no need to load the first dataset to get a list of its variables.
You can do something like

d using data2 ,varl
u `r(varlist)' using data1

If, unfortunatly, you only have access to Stata IC, there is not
really much you can do. In that case you will need to further cut down
on the number of variables you want to load.

Dear Sarah,

I tried your code
Use data2, clear
Use data1,
Keep 'r(varlist)'

I got the error message "no room to add more variables", do u have any
suggestions about this?
*   For searches and help try:

© Copyright 1996–2016 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index