View source: R/loadSiteConfig.R
| loadSiteConfig | R Documentation |
Reads the user's site-configuration file (~/.nprcgenekeepr_config, or
~/_nprcgenekeepr_config on Windows) using the tolerant
getSiteInfo parser, which handles the documented configuration
format (comment lines, blank lines, and multi-line / quoted /
comma-separated values; see
inst/extdata/example_nprcgenekeepr_config). The call is wrapped in
tryCatch so that a missing or malformed configuration file can never
crash the application on boot: in that case a warning is logged and
NULL is returned.
loadSiteConfig()
This replaces a former read.table(sep = "=") call in the application
server that assumed a strict two-column table, could not parse the documented
format, and crashed runGeneKeepR at startup.
A named list of site information (as returned by
getSiteInfo) when a configuration file is present and
parseable; otherwise NULL.
getSiteInfo, getConfigFileName,
appServer
library(nprcgenekeepr)
## Reads ~/.nprcgenekeepr_config (or ~/_nprcgenekeepr_config on
## Windows) if it exists; returns NULL when no config file is
## present, so this is safe to run on any machine.
config <- loadSiteConfig()
config
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.