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

st: looping through vectors


From   "PS" <[email protected]>
To   <[email protected]>
Subject   st: looping through vectors
Date   Wed, 28 May 2003 09:25:36 +0100

I have two vectors of variables, X and Z. I wish to copy the values of each
of the elements of Z to the corresponding (in terms of variable order)
element in X. Would the 'foreach' command be most suitable for this purpose
or would something simpler suffice? Thanks in advance,

Patrick

Dr Patrick Sturgis
Department of Sociology
University of Surrey
Guildford
GU27 1JF
tel: 01428 641 007
e-mail: [email protected]


*
*   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