From kevinushey at gmail.com  Tue Sep 30 20:14:48 2014
From: kevinushey at gmail.com (Kevin Ushey)
Date: Tue, 30 Sep 2014 11:14:48 -0700
Subject: [Rd] R's internal tar ignores files in sub-directories
Message-ID: <CAJXgQP2k2yStn9KNRkXj=hXd9vdRgrbHutkHZEMsvTQs1JSSVQ@mail.gmail.com>

E.g. I am seeing:

    dir <- file.path(tempdir(), "test-tar")
    dir.create(dir)
    setwd(dir)

    dir.create("foo", showWarnings = FALSE)
    file.create("foo/bar.R")

    tar("test.tar", files = "foo/bar.R")
    dir.create("untarred")
    untar("test.tar", exdir = "untarred")
    list.files("untarred", recursive = TRUE) # character(0)

As far as I can see, the documentation in `?tar` does not reflect that
R's internal `tar` expects paths to directories, not files themselves.
Although I would have preferred the files being included, or at least
a warning / error that they would be excluded.

Thanks,
Kevin

> sessionInfo()
R version 3.1.1 Patched (2014-09-27 r66695)
Platform: x86_64-w64-mingw32/x64 (64-bit)

locale:
[1] LC_COLLATE=English_United States.1252
[2] LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C
[5] LC_TIME=English_United States.1252

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

loaded via a namespace (and not attached):
[1] tools_3.1.1



[Rd] R's internal tar ignores files in sub-directories
Kevin Ushey