Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


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

st: Escaping left quote as argument of parse in split command


From   "Florian Kuhn" <florian@mail.utexas.edu>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: Escaping left quote as argument of parse in split command
Date   Tue, 3 Apr 2012 22:45:11 -0500

Hi all,

in my dataset, I have a string variable “id” in which the left single quote ` is used to separate a first and second part of the id (the creators of the dataset were clearly not using Stata). For example, a typical entry in the column "id" would be 15`32. I am trying to recover both parts of the id as separate variables using the "split" command.

However, escaping the backtick does not seem to work:
split id, parse("\`")
gives the error message:
{ required
r(100);

Am I missing something obvious here?
Thanks,
Florian
*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index