Statalist The Stata Listserver


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

st: Merging and applying ltrim?


From   "Ms. Marilyn Ibarra" <[email protected]>
To   [email protected]
Subject   st: Merging and applying ltrim?
Date   Fri, 8 Sep 2006 10:42:44 -0400 (EDT)

I have a string variable that in the data editor in STATA appears to be right aligned for some observations.  There are blanks before the actual values.  I was trying to merge two files and ended up with the variable us_id like this. It did not merge correctly. The first 6 observations should have merged and the last six observations should of merged as well. Any ideas?  I think I need to use ltrim but not sure where to put the ltrim() at? 

For example, I have the variable us_id;

us_id
00050
00010
00020
   00050
   00010
   00020
00060
00070
00080
   00060
   00070
   00080

Thanks,
Marilyn. 
*
*   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