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

st: problem referencing certain characters


From   [email protected]
To   [email protected]
Subject   st: problem referencing certain characters
Date   Thu, 21 Nov 2002 16:30:22 -0500

I am writing a program to clean up some data and I wish to delete certain
characters from my data.  I have been using the subinstr command with the
following syntax:
     replace `var' = subinstr(`var',"(removed character)","",.);
This works exactly as I intend, except for the double quotes character (")
and the question mark (?).  I referenced the stata manual and although the
issue is addressed, their solution does not seem to work for me.  They say
to use the compound double quotes (`" "').  But doing so makes no
difference for me.  Stata still is unable to correctly read the following
code:
     replace `var' = subinstr(`var',`"""',"",.);
     replace `var' = subinstr(`var',"?","",.);
I have no idea why it wont work for the question mark either.
If anyone has experienced similar problems or knows of a solution, please
inform.
Thank you,
Kyle

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