How do I save multiple graphs from quartz in R using a loop? -


I need to generate multiple image plots. I have a loop or function that will generate them and each one has its own Save the working directory with a unique name. This is what I have come up with (my still-beautiful-new-to-R skills):

 for  (i in 1: 5) {filename < -paste ("array", i) PNG ("filename") image (raw data [ii]) dev.off ()}  

it runs only through 5 image plots , But they are saved only with "filename" name, what is the best way to give each person a different name?

You are giving this same file name every time ( 'filename.png' / Code>).

Use the filename as an object, such as png (paste0 (filename, '.png'))


Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

lua - HowTo create a fuel bar -