0

I am running this code in R:

tiff("f0ex_plot.tiff", height = 10, width = 20, units= "cm", type = c("windows", "cairo"), res = 300)

But I am receiving an error:

Error in match.arg(type) : 'arg' must be of length 1

Any help?

2
  • Add some more information for better understanding. Jul 29 at 13:09
  • Hi, this is plotting code for previous plotting: f0ex_plot <- grid.arrange(p1, p2, p3, p4, ncol=2), do u need more information? Jul 29 at 13:16
0

The error Error in match.arg(type) : 'arg' must be of length 1 is associated with trying to pass more than one value to an argument that only accepts a single value. You are passing two values to the type argument. Try it with:

tiff("f0ex_plot.tiff", height = 10, width = 20, units= "cm", 
     type = "windows", res = 300)
  #... do something
dev.off()
2
  • thanks Jeffrey, it works! Jul 29 at 14:49
  • @Al-JawharahAl-Zamil, glad to hear. Please flag as answered so the post will be indicated as resolved. Jul 29 at 14:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.