loadSiteConfig: Load the site configuration for the modular Shiny application

View source: R/loadSiteConfig.R

loadSiteConfigR Documentation

Load the site configuration for the modular Shiny application

Description

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.

Usage

loadSiteConfig()

Details

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.

Value

A named list of site information (as returned by getSiteInfo) when a configuration file is present and parseable; otherwise NULL.

See Also

getSiteInfo, getConfigFileName, appServer

Examples

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

nprcgenekeepr documentation built on July 26, 2026, 5:06 p.m.