R/startup_congregation_configured.R

Defines functions startup_congregation_configured

Documented in startup_congregation_configured

#' @name startup_congregation_configured 
#' @title Determine if there congregation has a unit number
#' 
#' @description Returns a logical value when a single unit number
#'   exists in the Congregation table.
#'   
#' @export

startup_congregation_configured <- function()
{
  ch_local <- dbConnect(RSQLite::SQLite(), "C:/ldsmls/congregation.db")
  on.exit(dbDisconnect(ch_local))
  
  Congregation <- dbReadTable(ch_local, "Congregation")
  
  if (!nrow(Congregation)) return(FALSE)
  
  !is.na(Congregation[["UnitNumber"]])
}
nutterb/ldsmls documentation built on May 24, 2019, 10:52 a.m.