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 "."
Identifying specific patterns in longitudinal ratings dataHello forum participants, I am seeking your feedback in relation to the following task associated w…
Proportions in stata between 4 groupsHello All, I am trying to calculate proportions along with their difference, P value and CI's betwe…
Extract Specific Text Between ColonsGood afternoon, I am having trouble with this one today.... I need to extract to a new variable, a…
Competing Risk ModelI have a problem, where I am using hazard model. Database includes around 100 firms that are/are not…
Panel data: generate yearly average variableHello there, I am currently working with a panel dataset, and am having trouble with an issue I hop…
Subscribe to:
Post Comments (Atom)
0 Response to Rename from last part of label that includes "."
Post a Comment