-------------------------------------------------------------------------------
help for fdta                                                       version 2.0
                                                         get the newest version
-------------------------------------------------------------------------------

Change contents of string variables

Description

fdta check the string varibles, searching for st1. Whenever a matching str1 is found, it is replaced with str2.

Syntax

fdta variables , from(str1) [to(str2)]

Where the type of variables must be string. And if the variables specify as _all, it means all string variables in the database.

options Description ------------------------------------------------------------------------- * from(str1) find to be replaced * to(str2) use to replace occurrences of from() -------------------------------------------------------------------------

Examples

. sysuse auto

. fdta make, from(Buick) to(BMW)

. gen make2=word(make,1)

. fdta make-trunk, from(Merc.) to(BMW)

. fdta _all, f(Chev.) t(BMW)

. fdta _all, f(BMW) t("")

. fdta _all, f(AMC)

For problems and suggestions

Author: Liu wei, The School of Sociology and Population Studies, Renmin University of China. Address: Zhongguancun Street No. 59, Haidian District, ZIP Code: 100872. E-mail: rucwz-stata@yahoo.cn

Also see

Other Commands I have written:

curvefit (if installed) ssc install curvefit (to install) deci (if installed) ssc install deci (to install) elife (if installed) ssc install elife (to install) ftrans (if installed) ssc install ftrans (to install) freplace (if installed) ssc install freplace (to install) ftree (if installed) ssc install ftree (to install) fren (if installed) ssc install fren (to install)