“overwrite”参数默认值设置为”递归”。

huangapple go评论62阅读模式
英文:

"overwrite" argument default value set to "recursive"

问题

In "file.copy" R function, "recursive" in "overwrite" argument default value means 在 "file.copy" R 函数中,"overwrite" 参数的默认值中的 "recursive" 表示.

英文:

In "file.copy" R function,
what mean "recursive" in "overwrite" argument default value ?

> args(file.copy)
function (from, to, overwrite = recursive, recursive = FALSE,  
    copy.mode = TRUE, copy.date = FALSE)

答案1

得分: 1

overwrite 默认会使用 recursive 的值。由于 recursive 默认为 false,如果两者都未指定,overwrite 将为 false。如果将 recursive 改为 true 并且未指定 overwrite,它也将变为 true。这只是告诉您默认值的来源。

调用 覆盖 递归
file.copy()
file.copy(recursive=TRUE)
file.copy(overwrite=TRUE)
file.copy(overwrite=FALSE, recursive=TRUE)
英文:

That means overwrite will use the value of recursive by default. Since recursive is false by default, overwrite will be false if both are left unspecified. If you change recursive to true and leave overwrite unspecified, it will also become true. It's just telling you where the default value is coming from.

call overwrite recursive
file.copy() FALSE FALSE
file.copy(recursive=TRUE) TRUE TRUE
file.copy(overwrite=TRUE) TRUE FALSE
file.copy(overwrite=FALSE, recursive=TRUE) FALSE TRUE

huangapple
  • 本文由 发表于 2023年5月17日 21:13:12
  • 转载请务必保留本文链接:https://go.coder-hub.com/76272509.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定