getTokenList: Gets tokens from character vector of lines

Description Usage Arguments Value Examples

View source: R/getTokenList.R

Description

## Copyright(c) 2017-2020 R. Mark Sharp

Usage

1

Arguments

lines

character vector with text from configuration file

Value

First right and left space trimmed token from first character vector element.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
lines <- c("center = \"SNPRC\"",
           " baseUrl = \"https://boomer.txbiomed.local:8080/labkey\"",
           " schemaName = \"study\"", " folderPath = \"/SNPRC\"",
           " queryName = \"demographics\"",
           "lkPedColumns = (\"Id\", \"gender\", \"birth\", \"death\",",
           "              \"lastDayAtCenter\", \"dam\", \"sire\")",
           "mapPedColumns = (\"id\", \"sex\", \"birth\", \"death\", ",
           "  \"exit\", \"dam\", \"sire\")")
lkVec <- c("Id", "gender", "birth", "death",
           "lastDayAtCenter", "dam", "sire")
mapVec <- c("id", "sex", "birth", "death", "exit", "dam", "sire")
tokenList <- getTokenList(lines)
params <- tokenList$param
tokenVectors <- tokenList$tokenVec

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