0

This ought to be really simple, and yet...

I have a project like so:

`- MyProject
  `- DESCRIPTION
  `- R
    `- A.R
    `- B.R

with a DESCRIPTION file listing:

Collate:
  "A.R"
  "B.R"
  "C.R"

Now all I would like is to organize into subdirectories, say:

`- MyProject
  `- DESCRIPTION
  `- R
    `- A.R
    `- Bs
      `- B1.R
      `- B2.R

But if I write:

Collate:
  "A.R"
  "BS/B1.R"
  "BS/B2.R"

When I do load_all(), it complains:

! Skipping missing files:
  /Users/<me>/path/to/BS/B1.R
  and
  /Users/<me>/path/to/BS/B2.R

(Mind you, these paths are clickable, and open the actual correct file when clicked!!!!!)

Likewise, if I do check package, I get:

Error in .install_package_code_files(".", instdir) : 
files in 'Collate' field missing from '/Users/<me>/path/to/<project>.Rcheck/00_pkg_src/<project>/R':
  BS/B1.R
  BS/B2.R
ERROR: unable to collate and parse R files for package ‘<project>’

Again, I can manually verify that those files exist indeed in that directory.

Is there a known trick to use subdirectories? Is there a concern between UNIX-style paths vs Windows-style paths?

Ptival
  • 9,167
  • 36
  • 53
  • 1
    R doesn't allow subdirectories in the R folder of a package: https://stackoverflow.com/questions/14902199/using-source-subdirectories-within-r-packages-with-roxygen2 – MrFlick Mar 23 '23 at 18:05

0 Answers0