[R-pkg-devel] R package development
Brian G. Peterson
bri@n @ending from br@verock@com
Wed Jan 2 12:25:20 CET 2019
Normally you do not need to specify @usage in roxygen source files.
As Duncan noted, without seeing everything, we are only guessing, but I
suspect that you have tried to combine manual @usage directives with
@alias or @Rdfile directives in the roxygen for the other functions.
If my guesses are correct, I would put all of your descriptive text in
one place, and simply use @Rdfile for the other functions. Roxygen can
generate the usage automatically.
If either Duncan's hints or mine leave you still wondering what to do,
please post a link to the source repository, and I will take a look.
Regards,
Brian
On 01/01/2019 04:39 AM, 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.
>
> Kind Regards,
>
> Souvik
More information about the R-package-devel
mailing list