dot-format: Format objects for error logging

Description Usage Arguments Value Functions Note Examples

Description

Format objects for error logging

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
.formatQuote(v)

.formatComma(v)

.formatParams(v, con = "and")

.formatData(v)

.formatLog(v, fname = c())

.formatO(v, fname)

Arguments

v

character vector; just some strings

fname

character; function name

.log

character; previous called functions

Value

character

Functions

Note

Internal function only for convenience

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
## Not run: 
v <- c("one", "two", "three")
fname <- "foo"
.log <- c("foo1", "foo2", "foo3")

.formatQuote(v)
#[1] "\"one\""   "\"two\""   "\"three\""

.formatComma(v)
#[1] "one, two, three"

.formatParams(v)
#[1] "\"one\", \"two\" and \"three\""

.formatData(v)
#[1] "one$two$three"

.formatLog(v)
#[1] "\"one\", \"two\" and \"three\""

.formatLog(v, fname)
#[1] "\"one\", \"two\" and \"three\" (in foo)"

.formatO(.formatLog(v), fname)
#[1] "\"\"one\", \"two\" and \"three\"\" (foo)"

## End(Not run)

frankkramer-lab/RCX documentation built on July 14, 2021, 6:33 p.m.