[R-pkg-devel] R package development
Duncan Murdoch
murdoch@dunc@n @ending from gm@il@com
Tue Jan 1 15:10:07 CET 2019
On 01/01/2019 5:39 a.m., SOUVIK NATH wrote:
> Dear CRAN maintainers and R package developers,
>
> Respected Sirs,
>
>
>
> I am interested in submitting a package which I created in RStudio, that
> contains functions to compute the PDF,CDF and critical region of the
> distribution of sample correlation coeffecient :r. While running a R CMD
> check , it shows a warning() as follows :
>
>
>
> Bad \usage lines found in documentation object 'Rcor':
>
> Spdf(r,rho,n),Fpdf(r,rho,n),Hpdf(r,rho,n),Fcdf(a,rho,n),Hcdf(r,rho,n)
>
>
>
> Functions with \usage entries need to have the appropriate \alias
>
> entries, and all their arguments documented.
>
> The \usage entries must correspond to syntactically valid R code.
>
>
>
> Where the documentation for one of the R functions is given as follows :-
>
>
>
> #' PDF using Simulation
>
> #'
>
> #' @description used for computing the probability density functional value
> for the bivariate normal sample correlation coeffecient
>
> #' @usage Spdf(r,rho,n)
>
> #' @param r sample correlation coeffecient of the bivariate normal
> distribution sample
>
> #' @param rho population correlation coefficient of the bivariate normal
> distribution
>
> #' @param n sample size of the required Bivariate Normal Distribution
>
> #' @details uses Simulation to compute the PDF
>
> #' @return PDF of the sample correlation coeffecient distribution
>
> #' @author Souvik Nath <souvique using gmail.com> ,Rituparna Sen
>
> #' @references Anderson,T.W.,(2003) An Introduction to Multivariate
> Statistical Analysis.Third Edition ,Chapter 4, Page No 125. A JOHN WILEY
> AND SONS,INC.,PUBLICATION
>
> #' @references DAVID,F.N.,(1954) TABLES OF THE ORDINATES AND THE
> PROBABILITY INTEGRAL OF THE CORRELATION COEFFECIENT IN SMALL SAMPLES.
> ISSUED BY THE BIOMETRIKA OFFICE,UNIVERSITY COLLEGE,LONDON
>
> #' @seealso Fpdf,Hpdf,Fcdf,Hcdf,FQcdf,HQcdf,Scdf,cconfint
>
> #' @examples ## If we want to calculate the pdf for "r=0.1,rho=0.1,n=3"
>
> #' @examples ## Spdf(0.1,0.1,3) # 0.306
>
> #' @import mvtnorm
>
> #' @export
>
>
>
> Please let me know what can be done in this case, regarding the
> documentation. I have once submitted a copy of this package in CRAN few
> weeks ago. I realize that the files may have been removed and I need to
> resubmit them if required.
>
CRAN doesn't look at the Roxygen inputs, it looks at the .Rd files in
the man directory. From what you've posted, it is probably man/Rcor.Rd
that you need to look at. It will be up to you to make sure it follows
the specification in Writing R Extensions to be a valid Rd file. From
the message, it appears you have a line
Spdf(r,rho,n),Fpdf(r,rho,n),Hpdf(r,rho,n),Fcdf(a,rho,n),Hcdf(r,rho,n)
in the file, and that is not valid in an Rd file. It should perhaps be
five lines,
Spdf(r,rho,n)
Fpdf(r,rho,n)
Hpdf(r,rho,n)
Fcdf(a,rho,n)
Hcdf(r,rho,n)
but without seeing the whole file we can't say for sure.
Duncan Murdoch
More information about the R-package-devel
mailing list