0

I'm outputting a PNG from R:

png(filename = "X:/public/my_file.png", width = 1800, height = 1900, units = 'px')

And when I try to open it, I get the error:

A sharing violation occurred 

Is this specifically an issue within R, or if it's a permissions issue with Windows? I have access to the folder I'm outputting to so I'm really not sure what the issue is here.

halfer
  • 19,824
  • 17
  • 99
  • 186
DiamondJoe12
  • 1,879
  • 7
  • 33
  • 81
  • 1
    Without a detailed example of the code... maybe this helps https://stackoverflow.com/questions/16161852/saving-plots-in-r-within-a-loop – RobertoT Aug 30 '22 at 16:18
  • Are you calling `dev.off()` to close the graphics device after you draw the plot? It's easier to help you if you provide a [reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) with sample input that can be used to test and verify possible solutions. – MrFlick Aug 30 '22 at 17:48

0 Answers0