-1

In my computer, R CMD check said 0 NOTE, 0 WARNING, 0 ERROR and I submitted to CRAN. But, cran auto check said that there are errors, warnings and notes. Why?

R is latest version 3.6.1 and I use --as-cran option. I geuss the reason relates the fact that my computer cannot create pdf manual by the code R CMD Rd2pdf pkg path and thus the Latex check for Rd files is not incomplete. So, I have submitted to CRAN in 20~30 times to use R CMD check of CRAN ...

reference


The following error occurred in my R CMD check, but in the CRAN check, it did not occur and all my submission went through the CRAN check even if the following error did exist in my computer R CMD check.

* checking for file 'mypackage/DESCRIPTION' ... ERROR
Required field missing or empty:
  'Author'

I am not sure but the above error always occurs when I run R CMD check from comand line. But I could submit to CRAN even if R CMD check fails from comand prompt. And such error did not occurs in CRAN auto check or from Rstudio devtool::check().


I cannot replicate the result of CRAN auto check. I tried R CMD check --as-cran but it did not affects the result.

I am not sure but devtools::check() is --as-cran by default and I use it always.

Type: Package
Title:  title
Version: 0.2.0
AUthor: first last
Authors@R: person(given = "first",family = "last",email = "xxxxxxxxxxxx@gmail.com", role = c("aut", "cre") )

I added the AUthor: field but the error occurred.

My R was latest version, and further I use --as-cran but I cannot replicate the error of CRAN auto check.


* checking DESCRIPTION meta-information ... NOTE
Author field differs from that derived from Authors@R
  Author:    'xxxx yyyyy'
  Authors@R: 'xxxx yyyyy[aut, cre]'
Camford Oxbridge
  • 834
  • 8
  • 21

1 Answers1

1

Two possible explanations:

  1. You are not using the same version of R. (For CRAN submissions, R CMD check should be performed with the latest version of R-devel.)

  2. You did not add the option --as-cran when you checked your package. For CRAN submissions, you should do R CMD check mypackage --as-cran: more tests are performed than in the "standard" way.

To avoid those problems, you can check your package online with Winbuilder for example (although this is slightly less "eco-friendly" ;-)).

--

After your edit, I add this info:

In your DESCRIPTION file, you can use a simple Author field (which is the standard way), or you can use a more modern Authors@R: c(person(...)) syntax (and I suppose that you've done that). If you do that, the Author field is missing, and R CMD check complains about that. Consequently, you should first build your package with R CMD build mypackage, and in a second step, check the tar.gz created, by running R CMD check mypackage.tar.gz --as-cran.

This should do the trick.

Community
  • 1
  • 1
Philopolis
  • 515
  • 4
  • 13
  • Thank you. My R version was latest 3.6.1 and I run `R CMD check` with the option `--as@cran`. However, I cannot replicate the error of CRAN auto check. I also tried `R CMD build` but I cannot find where the `pkg.tar.gz` file is created. Thank you for your reply. – Camford Oxbridge Oct 24 '19 at 10:17
  • I can do the `R CMD build package path` and `R CMD check package.tar.gz path` but the result of R CMD check differs to CRAN auto check. – Camford Oxbridge Oct 24 '19 at 11:34