registryKeyExists | R Documentation |
This function is used to query whether a particular
key exists within the registry. It allows one to
check before accessing the key and potentially
generating an error. This is useful so that
we don't have to use numerous try
-catch
blocks to handle errors, and it also avoids displaying
error messages.
registryKeyExists(path = "", top = .BuiltinKeys[1])
path |
the path within the registry, relative to the
top-level key identified by |
top |
an identifier for one of the built-in top-level keys in which to resolve the path components. |
This merely tries to open the key and returns whether this was successful or not.
A logical value indicating whether the key exists and can be read.
Duncan Temple Lang <duncan@wald.ucdavis.edu>
http://www.omegahat.org/SWinRegistry
createRegistryKey
getRegistrySubKeyNames
getRegistry
getRegistryKeyValues
# See if R has been registered. registryKeyExists("HKEY_LOCAL_MACHINE\\Software\\R-core") # See if SNormal is registerd. registryKeyExists("SNormal") # Check the top-level key HKEY_CLASSES_ROOT exists registryKeyExists() # This fails on my machine as the Performance information # is not registered. try(registryKeyExists(top = .BuiltinKeys[8]))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.