为什么width.cutoff参数deparse限制为 500 字节?
考虑以下可重现的示例:
a <- substitute(12345.6789 * x0 + 123523.623529 * x1 + 1235235.6734636 * x2
+ 657567.6756756 * x3 + 756765.23523 * x4 + 54645.65464 * x5)
deparse(a)
[1] "12345.6789 * x0 + 123523.623529 * x1 + 1235235.6734636 * x2 + "
[2] " 657567.6756756 * x3 + 756765.23523 * x4 + 54645.65464 * x5"
Run Code Online (Sandbox Code Playgroud)
默认值width.cutoff是60,这意味着该函数将尝试将字符串分割成60块字符。如果将参数指定为上述整数500,则会出现以下错误:
deparse(a, width.cutoff = 501)
[1] "12345.6789 * x0 + 123523.623529 * x1 …Run Code Online (Sandbox Code Playgroud) r ×1