Statalist


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

st: How to eliminate the double quotes surrounding letters?


From   [email protected]
To   statalist<[email protected]>
Subject   st: How to eliminate the double quotes surrounding letters?
Date   Sat, 29 Aug 2009 14:49:20 +0800

Dear statalists,

I have a localname xy containing some letters among which there is space.

And I want rename a variable the localname xy. Due to the space, I took the 

-subinstr- funtion to eliminate the space. However, that treatment produced 

double-quotes surrounding the letters. How to deal with it?


To make what I said clear, I take an example below.

local xy "ab cd ef"

rename variable subinstr("`xy'"," ","",.)


Based on the typing above, Stata gives an error message "( not allowed r(101)".


Thank you very much for any help.


Best regards,

Rose.
 

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   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