Hello,
I would like to rename a variable (suppose it's name is VAR) with the content that is in a specific observation (let's say A[3] has the name of a city).
So, I want he name of VAR to be the name of the city in A[3].
My only idea was the following command:
rename (VAR) (A[3])
I know that to replace the content of VAR with the content of A[3] I can use
replace VAR = A[3]
But I want the name of VAR equal to the content of A[3].
Can someone help me?
Related Posts with Rename a variable with content
Handling of out of range valuesDear All, I've just found that the following code does not produce an error, while I anticipated it…
estout: Use \tabularnewline instead of \\ at the end of linesThe question is in the title :-) Is it possible to make estout use \tabularnewline instead of \\ for…
help with -expand-Dear statalist, I have a set of data which spans from 2019 to 2020, for some firms, the data only h…
Renaming graph labelsFor the bar graphs that are created using the data below, I am having trouble renaming the macro var…
Incomplete Data Pull using georoute CommandI am calculating driving distances using the georoute command with decimal degree coordinates. When …
Subscribe to:
Post Comments (Atom)
0 Response to Rename a variable with content
Post a Comment