Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: trim spaces in postcode


From   "Maurizio Gibin" <[email protected]>
To   <[email protected]>
Subject   Re: st: trim spaces in postcode
Date   Fri, 31 Mar 2006 15:41:15 +0100

Thank you Emma...
Easy and it's working!
Maurizio

>>> [email protected] 03/31/06 2:19 pm >>>
Hi Maurizio,

I'm probably being too simplistic but doesn't this do the job:

gen str8 newvar=subinstr(oldvar," ","",.)

if oldvar is your current postcode variable and newvar is a new one.

Cheers,

Emma

>>> [email protected] 31/03/06 13:55:54 >>>
Hi
I am trying to trim all the spaces in a code, in particular an english
unit postcode
but I still haven't found the correct way. I downloaded the ptseed
strip function but seems is not working.
Can anyone please help me? The database I am working on is quite
huge...
Thank you..
maurizio gibin
*
*   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/ 
*
*   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/
*
*   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