R has a magic number value of "PNG"

I have an R script that reads files and automatically generates graphs. It works when it starts for the first time. If there are .png files there, and the script needs to recreate them with new data, I get this error:

Error: bad restore file magic number (file may be corrupted) -- no data loaded In addition: Warning message: file 'test1.png' has magic number 'รซPNG' Use of save versions prior to 2 is deprecated Execution halted 

What does this error mean? I tried to use source ("filename"), it didn't work either.

thanks,

-4
source share
1 answer

I had to separate the directories I worked with. I output to another folder as described below.

setwd ("C / IMG")

+2
source

All Articles