Federico Calboli
2013-Dec-02 16:59 UTC
[R] vcf, plink and other files in the /demo of a package
Hi All, together with colleagues we are planning to submit a 2.0 version of a package we have on CRAN. Because the package deals with high throughput genomic data we though it would be nice to have some sort of guidance for the users. This should ideally mean a 'vignette', but as the time of writing nobody had time to set one up. What we have is three scripts that are heavily commented and a bunch of files (plink binary files and vcd files) that provide the 'example' data for these scripts. I was wondering whether the /demo directory would be an appropriate place where to put these scripts and the relative data. I ask because I am checking the package build and I get: checking index information ... WARNING Demo index entries without corresponding demo: [1] "/plink/MultiPhen_plink" "/simul/MultiPhen_simul" "/vcf/MultiPhen_vcf" See the information on INDEX files and package subdirectories in the chapter ?Creating R packages? of the ?Writing R Extensions? manual. despite the fact I did create a 00Index file in /demo: /demo$ cat 00Index /plink/MultiPhen_plink MultiPhen demo of how to use PLINK BED files /simul/MultiPhen_simul MultiPhen demo of how to run a simulation with MultiPhen /vcf/MultiPhen_vcf MultiPhen demo of how to use data in vcf format What am I missing? Given the state of the documentation (i.e. no vignette and demo scripts that rely on data that is not in .rda format) would we be better off removing this stuff altogether? BW F -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 881 bytes Desc: Message signed with OpenPGP using GPGMail URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20131202/229ce698/attachment.bin>
Duncan Murdoch
2013-Dec-02 18:35 UTC
[R] vcf, plink and other files in the /demo of a package
On 02/12/2013 11:59 AM, Federico Calboli wrote:> Hi All, > > together with colleagues we are planning to submit a 2.0 version of a package we have on CRAN. Because the package deals with high throughput genomic data we though it would be nice to have some sort of guidance for the users. This should ideally mean a 'vignette', but as the time of writing nobody had time to set one up. What we have is three scripts that are heavily commented and a bunch of files (plink binary files and vcd files) that provide the 'example' data for these scripts. I was wondering whether the /demo directory would be an appropriate place where to put these scripts and the relative data. > > I ask because I am checking the package build and I get: > > checking index information ... WARNING > Demo index entries without corresponding demo: > [1] "/plink/MultiPhen_plink" "/simul/MultiPhen_simul" "/vcf/MultiPhen_vcf" > See the information on INDEX files and package subdirectories in the > chapter ?Creating R packages? of the ?Writing R Extensions? manual. > > despite the fact I did create a 00Index file in /demo: > > /demo$ cat 00Index > /plink/MultiPhen_plink MultiPhen demo of how to use PLINK BED files > /simul/MultiPhen_simul MultiPhen demo of how to run a simulation with MultiPhen > /vcf/MultiPhen_vcf MultiPhen demo of how to use data in vcf format > > What am I missing? Given the state of the documentation (i.e. no vignette and demo scripts that rely on data that is not in .rda format) would we be better off removing this stuff altogether?Those index entries should be filenames of the demo files. The leading slash likely means R will interpret them as absolute paths, not relative paths, and that won't work. A more usual way to do it would be to give them simple names, e.g. MultiPhen_plink (corresponding to MultiPhen_plink.R). Since your demos refer to data files that are not embedded in the R code, you need to put those data files somewhere. They should go into the data directory if they are data a user can read (and then you need to follow the restrictions on things in that directory), or into your own directory below inst, to just be installed and available for use. In the latter case use system.file() to refer to them from within your demo code. Duncan Murdoch