Hello everybody!
I have a string variable labelled "X", which contains a series of numerical codes (e.g., 243 563453 21, 354 44 6, 23435 67, etc.).
I would need to remove all the spaces from each of these values.
Now, I have tried the standard subinstr function:
replace X = subinstr(X, " ", "", .)
but apparently this works only in case of letters, not with numerical characters. Could you please help me? I can't find the correct code.
Many thanks!
Kodi
Related Posts with How can I remove spaces in string variable
Formatting numbers saved in a local and using these in a text outputHello community! I am having troubles understanding the formatting of numbers, or more likely under…
putpdf "failed to add paragraph" when savingI am using putpdf to save 2 .png files into one pdf document. Code: putpdf begin putpdf paragraph…
how to produce share (%) of list of countries by sectorI am using stata 14.2 I would like to compute percentages instead of sum so that the total for each …
xtgls commandHi everyone, I have a panel data (T=9 and N=24) and I have the three following problems: - heterosce…
Delete words and rename variablesDear All How can I delete first words from a variable and retain the remaining words. Please find b…
Subscribe to:
Post Comments (Atom)
0 Response to How can I remove spaces in string variable
Post a Comment