[R-pkg-devel] Submission did not pass incoming checks

Ivan Krylov kry|ov@r00t @end|ng |rom gm@||@com
Mon Feb 28 15:21:11 CET 2022


On Sun, 27 Feb 2022 13:15:43 -0500
spsanderson using gmail.com wrote:

> https://win-builder.r-project.org/incoming_pretest/healthyR.ai_0.0.6_20220227_175008/

The important part is the following NOTE from
https://win-builder.r-project.org/incoming_pretest/healthyR.ai_0.0.6_20220227_175008/Debian/00check.log:

>> * checking R code for possible problems ... [10s/10s] NOTE
>> Found if() conditions comparing class() to string:
>> File ‘healthyR.ai/R/vec-hai-fourier-discrete.R’: if (class(.x) == "Date") ...
>> File ‘healthyR.ai/R/vec-hai-fourier-discrete.R’: if (class(.x) == "POSIXct") ...
>> File ‘healthyR.ai/R/vec-hai-fourier.R’: if (class(.x) == "Date") ...
>> File ‘healthyR.ai/R/vec-hai-fourier.R’: if (class(.x) == "POSIXct") ...
>> File ‘healthyR.ai/R/vec-hai-hyperbolic.R’: if (class(.x) == "Date") ...
>> File ‘healthyR.ai/R/vec-hai-hyperbolic.R’: if (class(.x) == "POSIXct") ...
>> Use inherits() (or maybe is()) instead.

It even suggests how to solve the problem: use inherits(.x, 'Date')
instead of class(.x) == 'Date'. For more information, see the R blog:
https://developer.r-project.org/Blog/public/2019/11/09/when-you-think-class.-think-again/index.html

-- 
Best regards,
Ivan



More information about the R-package-devel mailing list