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
Why no results for "estat abond" when running an xtabond mondel with "vce(gmm)"?Hi all, I'm estimating a model with the xtabond command, and when I run the post-estimation command…
A problem in Maximum Likelihood estimation (MLE) "‘lnfj’ invalid name"..Hello everyone, I am learning the MLE model and practicing through the book examples using Stata12.…
collapse all Variables in StataHi I have number of variables in Stata and I want to collapse in Stata using mean statistics. coll…
Coefplot issueHi all, I have a quick question. My code is below. When I do this code without the "at(vertical)" p…
Help needed with labeling y axis on a twoway graphDear Statalist users, I am creating a graph where I display recurrent event times over a period of …
Subscribe to:
Post Comments (Atom)
0 Response to How can I remove spaces in string variable
Post a Comment