Help making first dataset R package

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Help making first dataset R package

Martin Møller Skarbiniks Pedersen
Hi,

  I am trying to make my first R package containing only a single
data.frame and documentation.

  All code can be found at:
https://github.com/MartinMSPedersen/folkeafstemninger

When I check the package I get four warnings.
I will list all warnings in this email because they migth be connected.

1.
* checking if this is a source package ... WARNING
Subdirectory ‘src’ contains:
  convert_from_xml.R
These are unlikely file names for src files.

2.
* checking whether package ‘folkeafstemninger’ can be installed ... WARNING
Found the following significant warnings:
  Warning: no source files found
See ‘/home/mm/gits/folkeafstemninger.Rcheck/00install.out’ for details.

3.
* checking package subdirectories ... WARNING
Subdirectory ‘data’ contains no data sets.
Subdirectory ‘src’ contains no source files.

4.
* checking contents of ‘data’ directory ... WARNING
Files not of a type allowed in a ‘data’ directory:
  ‘folkeafstemninger.Rdata’
Please use e.g. ‘inst/extdata’ for non-R data files


 The raw xml-files I used to create the data.frame is placed under raw/
 The data.frame is saved as data/folkeafstemninger.RData
and
  The R source I wrote to convert the xml-files is placed under src/

Thanks for any help.

Regards
Martin

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: Help making first dataset R package

Bert Gunter-2
I think this would fit better on the r-package-devel list.

Cheers,
Bert



Bert Gunter

"The trouble with having an open mind is that people keep coming along and
sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )

On Wed, Jan 17, 2018 at 7:53 AM, Martin Møller Skarbiniks Pedersen <
[hidden email]> wrote:

> Hi,
>
>   I am trying to make my first R package containing only a single
> data.frame and documentation.
>
>   All code can be found at:
> https://github.com/MartinMSPedersen/folkeafstemninger
>
> When I check the package I get four warnings.
> I will list all warnings in this email because they migth be connected.
>
> 1.
> * checking if this is a source package ... WARNING
> Subdirectory ‘src’ contains:
>   convert_from_xml.R
> These are unlikely file names for src files.
>
> 2.
> * checking whether package ‘folkeafstemninger’ can be installed ... WARNING
> Found the following significant warnings:
>   Warning: no source files found
> See ‘/home/mm/gits/folkeafstemninger.Rcheck/00install.out’ for details.
>
> 3.
> * checking package subdirectories ... WARNING
> Subdirectory ‘data’ contains no data sets.
> Subdirectory ‘src’ contains no source files.
>
> 4.
> * checking contents of ‘data’ directory ... WARNING
> Files not of a type allowed in a ‘data’ directory:
>   ‘folkeafstemninger.Rdata’
> Please use e.g. ‘inst/extdata’ for non-R data files
>
>
>  The raw xml-files I used to create the data.frame is placed under raw/
>  The data.frame is saved as data/folkeafstemninger.RData
> and
>   The R source I wrote to convert the xml-files is placed under src/
>
> Thanks for any help.
>
> Regards
> Martin
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> [hidden email] 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.

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: Help making first dataset R package

Thierry Onkelinx
In reply to this post by Martin Møller Skarbiniks Pedersen
Dear Martin,

1 and 2. src is intended for C, C++ or Fortan files, not for R files.
See https://cran.r-project.org/doc/manuals/r-release/R-exts.html#Non_002dR-scripts-in-packages.
Either convert your script to a function and place it in the R folder
or place the the script in inst/src.
3 and 4. Note that R is case sensitive. the extension should be .RData
instead of Rdata. See
https://cran.r-project.org/doc/manuals/r-release/R-exts.html#Data-in-packages

Best regards,

ir. Thierry Onkelinx
Statisticus / Statistician

Vlaamse Overheid / Government of Flanders
INSTITUUT VOOR NATUUR- EN BOSONDERZOEK / RESEARCH INSTITUTE FOR NATURE
AND FOREST
Team Biometrie & Kwaliteitszorg / Team Biometrics & Quality Assurance
[hidden email]
Havenlaan 88 bus 73, 1000 Brussel
www.inbo.be

///////////////////////////////////////////////////////////////////////////////////////////
To call in the statistician after the experiment is done may be no
more than asking him to perform a post-mortem examination: he may be
able to say what the experiment died of. ~ Sir Ronald Aylmer Fisher
The plural of anecdote is not data. ~ Roger Brinner
The combination of some data and an aching desire for an answer does
not ensure that a reasonable answer can be extracted from a given body
of data. ~ John Tukey
///////////////////////////////////////////////////////////////////////////////////////////




2018-01-17 16:53 GMT+01:00 Martin Møller Skarbiniks Pedersen
<[hidden email]>:

> Hi,
>
>   I am trying to make my first R package containing only a single
> data.frame and documentation.
>
>   All code can be found at:
> https://github.com/MartinMSPedersen/folkeafstemninger
>
> When I check the package I get four warnings.
> I will list all warnings in this email because they migth be connected.
>
> 1.
> * checking if this is a source package ... WARNING
> Subdirectory ‘src’ contains:
>   convert_from_xml.R
> These are unlikely file names for src files.
>
> 2.
> * checking whether package ‘folkeafstemninger’ can be installed ... WARNING
> Found the following significant warnings:
>   Warning: no source files found
> See ‘/home/mm/gits/folkeafstemninger.Rcheck/00install.out’ for details.
>
> 3.
> * checking package subdirectories ... WARNING
> Subdirectory ‘data’ contains no data sets.
> Subdirectory ‘src’ contains no source files.
>
> 4.
> * checking contents of ‘data’ directory ... WARNING
> Files not of a type allowed in a ‘data’ directory:
>   ‘folkeafstemninger.Rdata’
> Please use e.g. ‘inst/extdata’ for non-R data files
>
>
>  The raw xml-files I used to create the data.frame is placed under raw/
>  The data.frame is saved as data/folkeafstemninger.RData
> and
>   The R source I wrote to convert the xml-files is placed under src/
>
> Thanks for any help.
>
> Regards
> Martin
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> [hidden email] 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.

______________________________________________
[hidden email] 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.