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 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
|
R version 4.0.4 beta (2021-02-06 r79953) -- "Lost Library Book"
Copyright (C) 2021 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin17.0 (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> NAME <- "warnings"
> source(file.path('_helper', 'init.R'))
>
> # tests designed to produce warnings
>
> # - Extra args for `str` -------------------------------------------------------
>
> a <- "hello"
> b <- "goodbye"
>
> invisible(diffStr(a, b, extra=list(comp.str="^"))) # "Specifying"
Warning message:
In capt_fun(target, current, etc = etc.proc, err = err, extra) :
Specifying `comp.str` may cause `str` output level folding to be incorrect
> invisible(diffStr(a, b, extra=list(comp="^"))) # "Specifying")
Warning messages:
1: In match.call(definition, call, expand.dots, envir) :
partial argument match of 'comp' to 'comp.str'
2: In capt_fun(target, current, etc = etc.proc, err = err, extra) :
Specifying `comp.str` may cause `str` output level folding to be incorrect
> invisible(diffStr(a, b, extra=list(indent.str="..."))) # "Specifying"
Warning message:
In capt_fun(target, current, etc = etc.proc, err = err, extra) :
Specifying `indent.str` may cause `str` output level folding to be incorrect
> invisible(diffStr(a, b, extra=list(indent="..."))) # "Specifying"
Warning messages:
1: In match.call(definition, call, expand.dots, envir) :
partial argument match of 'indent' to 'indent.str'
2: In capt_fun(target, current, etc = etc.proc, err = err, extra) :
Specifying `indent.str` may cause `str` output level folding to be incorrect
>
> # - Max diffs ------------------------------------------------------------------
>
> # Max limit warnings work properly; these are not fully fleshed out
>
> A3 <- c("a b c", "d e f A B C D", "g h i", "f")
> B3 <- c("a b c", "xd e f E Q L S", "g h i", "q")
>
> invisible(diffChr(A3, B3, max.diffs=2)) # warn: "Exceeded diff"
Warning message:
Exceeded diff limit during diff computation (6 vs. 2 allowed); overall diff is likely not optimal
>
> # - Overriden formals ----------------------------------------------------------
>
> # warn "Provided `style` argument will override the provided `format` argument"
> invisible(diffChr(letters, LETTERS, style=StyleRaw(), format="ansi8"))
Warning message:
In diffChr(target = letters, current = LETTERS, style = StyleRaw(), :
Provided `style` argument will override the provided `format` argument
>
> # warn: "Provided `style` .* `format` and `color.mode` arguments"
> invisible(
+ diffChr(letters, LETTERS, style=StyleRaw(), format="ansi8", color.mode="rgb")
+ )
Warning message:
In diffChr(target = letters, current = LETTERS, style = StyleRaw(), :
Provided `style` argument will override the provided `format` and `color.mode` arguments.
>
>
> proc.time()
user system elapsed
0.827 0.134 0.966
|