英文:
"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 |
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。


评论