winextras {utils}R Documentation

Get Windows Version

Description

Get the self-reported Microsoft Windows version number.

Usage

win.version()

Details

win.version is an auxiliary function for sessionInfo and bug.report.

Value

A character string describing the version of Windows reported to be in use.

Note

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.

Examples

if(.Platform$OS.type == "windows")
   print(win.version())

[Package utils version 4.4.1 Index]