Skip to content
Back to formatted view

Raw Message

Message-ID: <20220228172111.32a59999@Tarkus>
Date: 2022-02-28T14:21:11Z
From: Ivan Krylov
Subject: [R-pkg-devel] Submission did not pass incoming checks
In-Reply-To: <9EAAD7A4-03A8-4FF4-8EB4-871F535C07C6@gmail.com>

On Sun, 27 Feb 2022 13:15:43 -0500
spsanderson at 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