Statalist The Stata Listserver

[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Replacing several variables at once

From   "Nuno" <>
To   <>
Subject   st: Replacing several variables at once
Date   Tue, 6 Feb 2007 11:57:44 -0000

Hi everyone,

I need to replace missing values by 0 for a set of about 30 variables which
are not sequencially ordered and have very different names. I'm using the
-rename- command for each variable, but this becomes a bit cumbersome and
might contain errors given the number of the variables. Plus, I'll need to
redo the same thing for other datasets. Does anyone know a way of
facilitating this task? I was wondering if -inlist- would be suitable to do
this, as it would only be necessary to define the variables once( something
like replace inlist(arlist)=0 if inlist(varlist)==.).

All the best.

*   For searches and help try:

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