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

Lawrence, John P John.Lawrence at fda.hhs.gov
Fri May 4 19:38:49 CEST 2018


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]]



More information about the R-package-devel mailing list