IhsanKhaliq / ascotraceR

A mechanistic model to simulate the spread of Ascochyta blight in a chickpea field
https://ihsankhaliq.github.io/ascotraceR/
Other
4 stars 0 forks source link

Found if() conditions comparing class() to string #156

Open adamhsparks opened 2 years ago

adamhsparks commented 2 years ago
Found if() conditions comparing class() to string:
   File ‘ascotraceR/R/trace_asco.R’: if (class(primary_infection_foci) == "character") ...
   Use inherits() (or maybe is()) instead.
adamhsparks commented 2 years ago

Using inherits() is the canonical R way here.