winextras {utils} | R Documentation |
Get the self-reported Microsoft Windows version number.
win.version()
win.version
is an auxiliary function for
sessionInfo
and bug.report
.
A character string describing the version of Windows reported to be in use.
This function is only available on Microsoft Windows.
The result is based on the Windows GetVersionEx
API function. It
is not known how to detect a version of Windows before it is released, and
hence the textual information returned by R may identify an older version
than installed. The build number is more reliable. When running R in
compatibility mode, the reported version including the build number is the
compatibility version, not the installed version.
if(.Platform$OS.type == "windows")
print(win.version())