Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

st: Removing quotation marks in string variables


From   John Adam Roberts <roberts.john.adam@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: Removing quotation marks in string variables
Date   Fri, 5 Jul 2013 12:57:15 -0400

Hi,

I have a dataset that is full of strings that look like this:

ATUS00001213, "ATUS00001256","Jackson,Collin"

I'm going to separate these values into different variables and I'm
wondering how to remove the "s from the dataset.

For other characters, like commas, I would use the following command:
replace tags = subinstr(tags,",","",.)

but
replace tags = subinstr(tags,""","",.)
replace tags = subinstr(tags,'"',"",.)
replace tags = subinstr(tags,""",.,.)
replace tags = subinstr(tags,'"',.,.)
don't work.

Thanks in advance for the help!

-Adam
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index