Hi. This will likely be a banal and rudimentary question. Apologies in advance, but I am stuck nevertheless. To my own disgrace, I am not able to troubleshoot through help format.
I have a string variable imported from an excel file. This string variable is stored as str6 %9s. I need to format this variable such that:
1. There are 6 characters/digits for each observation
2. There is a decimal before the final two characters/digits, and after the first 4.
Current values for this variable, TOP, include:
130800
83700
10100
100810
However, I need these (and all other) values to take the following form:
1308.00
0867.00
0101.00
1008.10
Thanks in advance.
Related Posts with Formatting a String
Is there a way to increase the number of characters shown when tabulating categorical variables?I'm dealing with some messy data and before I figure out the best way to clean it, I need some summa…
Confidence intervalDear Colleagues, I have a problem interpreting confidence interval for vaxera and vaxera2017. What …
Predicted Probabilities in CMP for multinomial probits don't sum to 1?Dear all, I have been using CMP, a wonderful package for models whose disturbance terms are multiva…
Aligning x-axes with graph combineHi Statalist, Using 'graph combine' I have combined four graphs. The graphs depict physiological da…
Creating a new variable in panel data that meets multiple conditionsHi, I am having some trouble with my coding for STATA currently. I have panel data that has multipl…
Subscribe to:
Post Comments (Atom)
0 Response to Formatting a String
Post a Comment