Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

"overwrite" argument default value set to "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)

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

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
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading