RStudio - loop command for series of images and export without overwriting

What have you tried so far ?

Could you ask this with a minimal REPRoducible EXample (reprex)? A reprex makes it much easier for others to understand your issue and figure out how to help.