getDemographics: Get demographic data

Description Usage Arguments Value Examples

View source: R/getDemographics.R

Description

This is a thin wrapper around labkey.selectRows().

Usage

1
getDemographics(colSelect = NULL)

Arguments

colSelect

(optional) a vector of comma separated strings specifying which columns of a dataset or view to import

Value

A data.frame containing LabKey demographic data with the columns specified in the single parameter provided.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
library(nprcgenekeepr)
siteInfo <- getSiteInfo()
colSet <- siteInfo$lkPedColumns
source <- " generated by getDemographics: "
pedSourceDf <- tryCatch(getDemographics(colSelect = colSet),
                        warning = function(wCond) {
                          cat(paste0("Warning", source, wCond),
                                     name = "nprcgenekeepr")
                          return(NULL)},
                        error = function(eCond) {
                          cat(paste0("Error", source, eCond),
                                     name = "nprcgenekeepr")
                          return(NULL)}
)

rmsharp/nprcmanager documentation built on April 24, 2021, 3:13 p.m.