Below, a loop draws scatterplots of income quintiles (*Lowest to *Fifth) against year for 3 jurisdictions (Florida, etc). The x (`x') helps define the variable names uniquely for each jurisdiction. I want the exported file names
also to be defined uniquely for each jurisdiction. However, Stata does not seem to "see" the `x' in the emf export file name and instead returns this red "already exists" error:
file C:\Users\me\Desktop\Analysis\output_dr afts.emf already exists
also to be defined uniquely for each jurisdiction. However, Stata does not seem to "see" the `x' in the emf export file name and instead returns this red "already exists" error:
file C:\Users\me\Desktop\Analysis\output_dr afts.emf already exists
Code:
foreach x in Florida NY NJ { twoway connected `x'Lowest `x'Second `x'Third `x'Fourth `x'Fifth Year, name(`x', replace) graph export C:\Users\me\Desktop\Analysis\output_drafts\`x'.emf }
Can this be remedied somewhat simply? This looping project has me going in circles and the next phase of my analysis will draw 30 graphs.
Comment