getRegistryValue | R Documentation |
Get the value of a specific, individual key in the registry. This key is assumed to have a value rather than being merely a container key for other sub-keys.
getRegistryValue(path, key, isError = TRUE, top = .BuiltinKeys[1])
path |
the path to the specified node in which the
actual key is located.
The path can be specfied in a variety of ways.
It can be a single string with nodes in the path separated
by the \\ character (e.g. |
key |
the name of the key whose value is to be retrieved. If this is not specified, the key is taken to be the last element of path. |
isError |
a logical value that indicates whether to throw an error
if the key does not exist, or simply return a missing value.
This allows the caller to avoid having to first check if the key exists
or handle the error with a call to |
top |
the identifier of the top-level key in which to resolve
the |
This calls the C-level API routine
RegQueryValueEx
.
The conversion from the registry value to an S object
is done according to the following mapping of the types:
The value from the key converted to an S object.
Duncan Temple Lang <duncan@wald.ucdavis.edu>
http://www.omegahat.org/SWinRegistry
getRegistryKeyValues
getRegistrySubKeyNames
.resolveToplevelRegistryKey
getRegistryValue("Control Panel\\Current", "Color Schemes", top = "HKEY_CURRENT_USER") setRegistryValue("HKEY_CURRENT_USER\\Volatile Environment\\duncan", value = "foobar") getRegistryValue("HKEY_CURRENT_USER\\Volatile Environment", "duncan") ## Not run: getRegistryValue("SNormal\CLSID\") [1] "{C484D2F9-21F5-49AC-8C8D-2007E12245D3}" getRegistryValue("SNormal\CLSID", "") [1] "{C484D2F9-21F5-49AC-8C8D-2007E12245D3}" getRegistryValue(c("SNormal", "CLSID"), "") [1] "{C484D2F9-21F5-49AC-8C8D-2007E12245D3}" getRegistryValue(c("SNormal", "CLSID", "")) [1] "{C484D2F9-21F5-49AC-8C8D-2007E12245D3}" ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.