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

st: ` ' syntax


From   "Terra Curtis" <[email protected]>
To   <[email protected]>
Subject   st: ` ' syntax
Date   Thu, 29 Sep 2005 14:54:52 -0400

Dear Statalist,

Does anyone know if there is a similar syntax to `x' for string variables? 

I have a string variable which might have contents like:
1, 2, 3, 4

I want to replace this string, under certain conditions, with something
like:
1, 2, 3, 4, 5

i.e. I want to keep the string and append ", 5", for example, to the end.

What I have written is this, but I realized the `myvar' notation only makes
sense when myvar is numeric.

replace match="`match', `y'" if ... Where y is numeric.

Again, ideas?  Thanks so much.
Terra 

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