convertStringList2Types: Converts string elements of a named list to apporpriate types

Description Usage Arguments Value Examples

View source: R/readPar.R

Description

Strings that consist of digits are converted to type numeric, strings with TRUE/FALSE, T/F, or T.../F... to logical.

Usage

1

Arguments

in.l

Named list fo strings.

Value

Named list with elements converted to appropriate types.

Examples

1
2
3
4
5
6
7
 l.tst = list()
 l.tst$aaa = '1000'
 l.tst$bbb = '1000xx'
 l.tst$ccc = 'True'
 l.tst$ddd = 'xxxTrue'
 l.res = convertStringListToTypes(l.tst)
 str(l.res)

dmattek/tca-package documentation built on Dec. 10, 2019, 4:10 p.m.