DOI in CRAN submission of R package?
Asked Answered
G

1

5

After submitting an R package to CRAN, I received one of the following suggestions:

"Is there some reference about the method you can add in the Description field in the form Authors (year) ?"

After doing some searching, I haven't really found any instances of people putting DOIs in the Description file, except perhaps in the CITATION file, but that is not what is asked for here it seems. May I ask how I might go about resolving this issue? Thanks in advance!

Gradate answered 2/3, 2020 at 16:44 Comment(3)
An example here.Porphyria
another exampleMetaphor
I googled "r package doi" and found this one, among others. That package's CRAN page was the third resultWhiff
G
9

Your searching may have been superficial. Limiting it to the subset of what I may have installed here so that I can grep:

edd@rob:~$ grep -l "<doi:.*>" /usr/local/lib/R/site-library/*/DESCRIPTION
/usr/local/lib/R/site-library/acepack/DESCRIPTION
/usr/local/lib/R/site-library/arules/DESCRIPTION
/usr/local/lib/R/site-library/datasauRus/DESCRIPTION
/usr/local/lib/R/site-library/ddalpha/DESCRIPTION
/usr/local/lib/R/site-library/DEoptimR/DESCRIPTION
/usr/local/lib/R/site-library/distr6/DESCRIPTION
/usr/local/lib/R/site-library/dqrng/DESCRIPTION
/usr/local/lib/R/site-library/earth/DESCRIPTION
/usr/local/lib/R/site-library/fastglm/DESCRIPTION
/usr/local/lib/R/site-library/fields/DESCRIPTION
/usr/local/lib/R/site-library/HardyWeinberg/DESCRIPTION
/usr/local/lib/R/site-library/jomo/DESCRIPTION
/usr/local/lib/R/site-library/lava/DESCRIPTION
/usr/local/lib/R/site-library/loo/DESCRIPTION
/usr/local/lib/R/site-library/lpirfs/DESCRIPTION
/usr/local/lib/R/site-library/mcmc/DESCRIPTION
/usr/local/lib/R/site-library/mice/DESCRIPTION
/usr/local/lib/R/site-library/party/DESCRIPTION
/usr/local/lib/R/site-library/plm/DESCRIPTION
/usr/local/lib/R/site-library/praznik/DESCRIPTION
/usr/local/lib/R/site-library/Rcpp/DESCRIPTION
/usr/local/lib/R/site-library/RcppSMC/DESCRIPTION
/usr/local/lib/R/site-library/RcppZiggurat/DESCRIPTION
/usr/local/lib/R/site-library/RProtoBuf/DESCRIPTION
/usr/local/lib/R/site-library/spam/DESCRIPTION
/usr/local/lib/R/site-library/SQUAREM/DESCRIPTION
/usr/local/lib/R/site-library/stabs/DESCRIPTION
/usr/local/lib/R/site-library/tweedie/DESCRIPTION
/usr/local/lib/R/site-library/xgboost/DESCRIPTION
edd@rob:~$ 

And, just to plain, here are the first ten lines of the actual result set:

edd@rob:~$ grep -h "<doi:.*>" /usr/local/lib/R/site-library/*/DESCRIPTION | head -10
  80:580-598. <doi:10.1080/01621459.1985.10478157>].
  <doi:10.1080/01621459.1988.10478610>]. A good introduction to these two methods is in chapter 16 of
    See Christian Borgelt (2012) <doi:10.1002/widm.1074>.
             <doi:10.1145/3025453.3025912>.
Description: Contains procedures for depth-based supervised learning, which are entirely non-parametric, in particular the DDalpha-procedure (Lange, Mosler and Mozharovskyi, 2014 <doi:10.1007/s00362-012-0488-4>). The training data sample is transformed by a statistical depth function to a compact low-dimensional space, where the final classification is done. It also offers an extension to functional data and routines for calculating certain notions of statistical depth functions. 50 multivariate and 5 functional classification problems are included. (Pokotylo, Mozharovskyi and Dyckerhoff, 2019 <doi:10.18637/jss.v091.i05>).
  Brest et al. (2006) <doi:10.1109/TEVC.2006.872133>.
Description: An R6 object oriented distributions package. Unified interface for 42 probability distributions and 11 kernels including functionality for multiple scientific types. Additionally functionality for composite distributions and numerical imputation. Design patterns including wrappers and decorators are described in Gamma et al. (1994, ISBN:0-201-63361-2). For quick reference of probability distributions including d/p/q/r functions and results we refer to McLaughlin, M. P. (2001). Additionally Devroye (1986, ISBN:0-387-96305-7) for sampling the Dirichlet distribution, Gentle (2009) <doi:10.1007/978-0-387-98144-4> for sampling the Multivariate Normal distribution and Michael et al. (1976) <doi:10.2307/2683801> for sampling the Wald distribution.
  proposed by Marsaglia and Tsang (2000, <doi:10.18637/jss.v005.i08>).
  Threefry engine (Salmon et al., 2011 <doi:10.1145/2063384.2063405>) as
    Splines" <doi:10.1214/aos/1176347963>.
edd@rob:~$ 
Gharry answered 2/3, 2020 at 16:47 Comment(8)
@Alan: Please don't do that. You inserted paragraphs that alter the meaning, and I believe in the style of showing the shell prompt for a shell command. So I rolled that bacl. If you are greatly offended by the style, feel free to say so in the comment, add a new answer -- but pretty please do not make uncoordinated changes. Thank you for your understanding.Gharry
Why not? It significantly improves the readability of the output.Sphingosine
Beauty is in the eye of the beholder. That is a very subjective statement. I have given thousands of answers here, including many for shell, others for R, ... A prompt adds clarity. Feel free to omit it in your answers but please allow me to stick with what I believe in, and what the OP already accepted.Gharry
Fair enough. I think it reduces the legibility and makes it needlessly difficult to copy commands to the terminal. I object strongly to saying that I altered the meaning or that the changes are uncoordinated. Thanks for the clarificationSphingosine
It is a literal copy of what my shell terminal shows. What could be clearer? The line breaks you added didn't exist or appear there --> you altered reality which I find inferior. And there was no prior discussion or agreement --> uncoordinated. Anyway, moving on now. Thanks again for your understanding.Gharry
I didn't add line breaks, I simply separated command from output. Edits are almost always uncoordinated in that sense, unless I've missed a lot of consultation between users. However I respect that you want to retain the style of your answer so again thanks and good luck.Sphingosine
Akk. I sometimes do that too, e.g. when I show multi-line Rcpp code snippets generating multilibe answers. But for one-liners I really it is best to keep it together.Gharry
Sure, to be honest I didn't think it was a choice, rather a quick copy/paste (wouldn't have edited if I thought it was). Have a good oneSphingosine

© 2022 - 2024 — McMap. All rights reserved.