Dear all, I am trying to find a way to reliably and programmatically establish the resolution (i.e. DPI or equivalent) of an on-screen device. It seemed to me that
dev.new(width=1, height=1) dpi <- dev.size("px") would do the trick, but the result does not seem to be correct, at least on OS X 10.9.1 using the "quartz" device. Specifically, the window that appears is 1 inch square, as expected, but the result from dev.size() is c(72,72), which isn't correct. My display is 1440x900, but if I call dev.new(width=720/72, height=450/72) the resulting device fills much more than half the screen. But R gets the size right in inches, so it, or something it calls, must presumably know the real DPI value. So, could anyone tell me whether there is a reliable way to determine DPI, please? All the best, Jon [[alternative HTML version deleted]] ______________________________________________ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel