Search notes:

R function: dev.size

dev.size(…) reports the dimensions of the current device. The units can queried in inches (units='in'), centimeters (cm) or pixels (px);
pixels <- dev.size(units='px');
width  <- pixels[1];
height <- pixels[2];

See also

The graphical parameter din.
Index to (some) R functions

Index