Stata 13 foreach rename variables12/3/2023 I tend now more often to use gettoken: local croplist mz gmz sp sptc mil cof suk tea ric Note also rename in Stata 12+ can handle this regexr() is a function, not a command a more general discussion in (a little out-of-date, but relevant on the main issue) you have too many quotation marks on your rename command, so it wouldn't work. Label var pkg`sffx' "Avg district level `sffx' price" Local croplist mz gmz sp sptc mil cof suk tea ric The heart of the problem is cycling over two lists at once. You have the new suffixes the prefix pkg is always the same, so the labour of extracting it repeatedly is unnecessary. There is no need here to invoke regular expressions.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |