On 10/18/16, 12:52 PM, "Duncan Murdoch" wrote:
>On 18/10/2016 12:38 PM, Roebuck,Paul L wrote:
>> Any reason untar() has an "exdir" argument (the equivalent of "tar -C"),
>> but tar() does not?
>
>Because you can specify the source directory in the files argument using
>list.files(). There's no need to duplicate that in tar().
But that solution introduces (undesired) intermediate directory paths
into the tar archive.
Any other thoughts outside using something like below:
stopifnot(dir.exists(local))
savedir <- ""
tryCatch({
savedir <- setwd(local)
tar(Š)
},
finally = setwd(savedir))
The information contained in this e-mail message may be privileged,
confidential, and/or protected from disclosure. This e-mail message may contain
protected health information (PHI); dissemination of PHI should comply with
applicable federal and state laws. If you are not the intended recipient, or an
authorized representative of the intended recipient, any further review,
disclosure, use, dissemination, distribution, or copying of this message or any
attachment (or the information contained therein) is strictly prohibited. If
you think that you have received this e-mail message in error, please notify
the sender by return e-mail and delete all references to it and its contents
from your systems.
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.