I have many variables. Some begin with "YJan2016" (or another date) and others begin with "Y2016" (or another date). Instead, I am trying to make them end with "Jan2016" or "2016", respectively. Does anyone know how I can do this?
In the rename help file, I found this line, but I don't know how to specify when Stata should be swapping the prefixes and (nonexistent) suffixes. If it helps, no variable besides date variables begins with the character "Y":
"rename *stat* *[2]stat*[1]: Swaps prefixes and suffixes; it renames bpstata to astatbp, rstater to erstatr, etc."
In the rename help file, I found this line, but I don't know how to specify when Stata should be swapping the prefixes and (nonexistent) suffixes. If it helps, no variable besides date variables begins with the character "Y":
"rename *stat* *[2]stat*[1]: Swaps prefixes and suffixes; it renames bpstata to astatbp, rstater to erstatr, etc."
Comment