Re: [Rd] R CMD build: "Subdirectory 'R' contains invalid file names"

From: Henrik Bengtsson <hb_at_maths.lth.se>
Date: Fri 10 Feb 2006 - 11:08:04 GMT

Hi,

On 2/10/06, Kurt Hornik <Kurt.Hornik@wu-wien.ac.at> wrote:
> >>>>> Henrik Bengtsson writes:
>
> > Hi, I get
> > * excluding invalid files from 'R.oo'
> > Subdirectory 'R' contains invalid file names:
> > attachLocally.Object.Rex Exception.Rex extend.default.Rex
> > InternalErrorException.reportBug.Rex Package.Rex Person.Rex Rdoc.Rex
> > setMethodS3.Rex StaticFields.Rex
>
> > when running R CMD build in R v2.3.0 devel. I do understand what is
> > going on. In my *.R files I keep so called Rdoc comments which in
> > their simplest form are Rd code wrapped up in plain comments. These
> > are compiled into Rd files written to ../man/ (I do this prior to
> > building packages). Rdoc also supports inclusion of other files, e.g.
> > @include "Person.Rex" to include example code.
>
> > With this structure I can, when I develop/maintain a package, have
> > <pkg>/R/ as the working directory, modify my *.R files and re-source
> > them from within R. Since I keep all my Rd example code in separate
> > *.Rex files, I can easily rerun/test these by sourcing them too. I
> > find this very convenient.
>
> > In previous versions, the *.Rex files was included when building a
> > source distribution of a package. In R v2.3.0 they are excluded.
> > However, I would like to distribute the *.Rex files with my
> > source-code package too (so I do not have to keep another type of
> > source distribution). Note that these files are only needed for
> > further development of the package, but *not* to install the package
> > from source (since their contents is already incorporated in the Rd
> > files). They are also not of interest to the end-user.
>
> Henrik,
>
> I am not sure I fully understand the issue.
>
> The
>
> Note that these files are only needed for further development of the
> package
>
> suggests that these files are only needed for your local master sources,
> but not in the source package created by R CMD build. If this is the
> case, then you really don't have to do anything, because R CMD build
> will happily exclude these files, and R CMD check on the .tar.gz will no
> longer find them.

Yes. However, I would like to avoid to keep a version of "local master sources". Until now, all necessary code in my packages are available in the *.tar.gz files build by R CMD build. This is convenient if someone else wants to contribute/add to my package, the *.tar.gz is all that is needed and it is available on the web. I can also update my package on request, say, when I travel, without having access to my "local master sources". Kind of a poor man's subversion/cvs.

Thanks

Henrik

> Best
> -k
>
> > My question is how to incorporate the *.Rex files? Here are some
> > ideas, that I would like to have some feedback on:
>
> > 1) Put them in <pkg>/R/Rex/*.Rex. However, Section 1.1.4 in Writing R
> > Extensions suggest that subdirectories of R/ may only(?) be named
> > 'windows' or 'unix'.
>
> > 2) Rename them to <pkg>/R/*.in, cf. Section 1.1.4. Is this the
> > purpose of *.in files? Will it have side effects?
>
> > 3) Put the in <pkg>/inst/<dir>/*.Rex. This will work, but then they
> > will also be install and available in system.file("<dir>",
> > package="<pkg>"). Not a big problem, but not what I want.
>
> > 4) To avoid (3), put the in <pkg>/<dir>/*.Rex, i.e. at the top level
> > directory. Is this allowed? Section 1.1.4 says "Note that [...]
> > information files at the top level of the package will not be
> > installed". Does this mean that they will be included in the source
> > distribution and what about top level directories?
>
> > 5) Put the in <pkg>/src/*.Rex. Can src/ be used this way too?
>
> > 6) Ask R-core to revert back to pre-R v2.3.0 and allow other files in
> > the R/ directory too. Are more people than I interested in this?
>
> > I realize I can test the above by trial and error, but I will still
> > not be sure what is the right approach here. Comments/feedback is
> > appreciated.
>
> > Thanks
>
> > Henrik
>
> > ______________________________________________
> > R-devel@r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-devel
>
>

--
Henrik Bengtsson
Mobile: +46 708 909208 (+1h UTC)

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Received on Fri Feb 10 22:18:39 2006

This archive was generated by hypermail 2.1.8 : Mon 20 Feb 2006 - 03:21:41 GMT