I want to dynamically change the "reporter_name" text in write.xlsx( myfile, file = "reporter_name.csv") whenever I save my .csv file based on the country reporter name.
e.g. if my variable reporter_name="Thailand" it automatically saves as write.xlsx( myfile, file = "Thailand.csv")
Is there a quick way to do this?
The reporter name is inputted at the start of the script and I would like to have the output automatically saved without having to edit anything else later, so that it doesn't for instance overwrite the previous country file if I forget to change it.