Hello! I'm trying to rename variables from the label, but this label includes dots (".")
Example Label: "aaa.1.bbb.actual_label"
Hence, the following doesn't work:
foreach v of varlist v655 v656 ... v688 v689 {
local x : variable label `v'
rename `v' `x'
}
I've used ways to read from a particular position in a string before but I can't seem to make it work now.
Would be very grateful for help!
Related Posts with Rename from last part of label that includes "."
Drop observation in panel dataHi Stata Forum, I have a rather basic question on dropping observation that I cannot seems to solve…
Clustering with multiple survey wavesHi, I am using two waves of survey data (not a panel) with the outcome defined at the individual le…
mixed models, continuous variablesHi! I'm new on Stata and I apologize in advance for trivial questions I'm working on a mixed models…
Unexpected behaviour from $frame test: brI am thouroughly thrilled about the new -frame- concept in Stata 16, and I have been using it extens…
Frequency tableI have monthly data from investment funds over 50 years and would like to have a table showing me ho…
Subscribe to:
Post Comments (Atom)
0 Response to Rename from last part of label that includes "."
Post a Comment