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: cleaning height data


From   "Kathleen L. Carluzzo" <[email protected]>
To   "[email protected]" <[email protected]>
Subject   st: cleaning height data
Date   Fri, 14 Feb 2014 21:21:35 +0000

Hello, I am trying to clean height data that looks like this:

height
5' 5"
5' 0.5"[PT S
5' 5"[verb
5' 2"
6' 0.5"[stat

I want to convert height to inches; using the "split" command, I can split
the variable at feet using the single quotation but can't split out the
inches because the sign for inches is one double quotation mark ("), which
gives me the error message "unmatched quote". For example,

This works: split height, p(' )
This does not work: split height, p(")
Nor does this: strparse height, gen(height_in) parse(")

I also tried variables on this, such as: split height, p(""")

Any suggestions? Thanks!




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