[R-pkg-devel] updating my package to fix if () condition has length > 1

Maxime Turgeon maxime.turgeon at mail.mcgill.ca
Fri May 4 21:32:50 CEST 2018


Hi John,


I think you misread the check output. You got a WARNING because you didn't change the package version (the current 0.1.0 is the same as the incoming 0.1.0). At the end of the output, you also get the results of R CMD check on the current version (i.e. the one on CRAN). Of course, the version on CRAN hasn't been updated yet, and this is why you get the ERROR.


Regards,

Max Turgeon

________________________________
From: R-package-devel <r-package-devel-bounces at r-project.org> on behalf of Lawrence, John P <John.Lawrence at fda.hhs.gov>
Sent: May 4, 2018 1:38:49 PM
To: 'r-package-devel at r-project.org'
Subject: [R-pkg-devel] updating my package to fix if () condition has length > 1


I received the following message from CRAN team autocheck service after updating my package:

"

package SurvDisc_0.1.0.tar.gz does not pass the incoming checks automatically, please see the following pre-tests:

Windows: <https://win-builder.r-project.org/incoming_pretest/SurvDisc_0.1.0_20180504_172206/Windows/00check.log>

Status: 1 WARNING

Debian: <https://win-builder.r-project.org/incoming_pretest/SurvDisc_0.1.0_20180504_172206/Debian/00check.log>

Status: 1 WARNING



Last released version's CRAN status: ERROR: 4, OK: 8

See: <https://CRAN.R-project.org/web/checks/check_results_SurvDisc.html>
"

In the check results, it has this message:
"
  Error in if (!is.element(substr(method, 1, 1), c("b", "P"))) { :
    the condition has length > 1
  Calls: AsympDiscSurv
  Execution halted
"

But, I had already changed that line to this:

if (!is.element(substr(method[1], 1, 1), c("b", "P"))) {


I know the variable "method" is a single character string, but to handle the error checking, I now explicitly tell it to use "method[1]".
Since I already fixed it before re-submitting the package, I don't understand why I am getting this error message or even why it still thinks it is using "method" instead of "method[1]" in that line.

Thanks,
John




        [[alternative HTML version deleted]]

______________________________________________
R-package-devel at r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel

	[[alternative HTML version deleted]]



More information about the R-package-devel mailing list