[Rd] is class2 Parameter's Documentation is Ambiguous
Thierry Onkelinx
th|erry@onke||nx @end|ng |rom |nbo@be
Tue Aug 16 12:09:46 CEST 2022
Dear Dario,
You misunderstood the documentation of is(). class1 refers to extends().
is() only uses class2, not class1.
I'd use inherits(your_object, "DataFrame") and inherits(your_object,
"data.frame"). The latter is probably redundant.
Best regards,
ir. Thierry Onkelinx
Statisticus / Statistician
Vlaamse Overheid / Government of Flanders
INSTITUUT VOOR NATUUR- EN BOSONDERZOEK / RESEARCH INSTITUTE FOR NATURE AND
FOREST
Team Biometrie & Kwaliteitszorg / Team Biometrics & Quality Assurance
thierry.onkelinx using inbo.be
Havenlaan 88 bus 73, 1000 Brussel
www.inbo.be
///////////////////////////////////////////////////////////////////////////////////////////
To call in the statistician after the experiment is done may be no more
than asking him to perform a post-mortem examination: he may be able to say
what the experiment died of. ~ Sir Ronald Aylmer Fisher
The plural of anecdote is not data. ~ Roger Brinner
The combination of some data and an aching desire for an answer does not
ensure that a reasonable answer can be extracted from a given body of data.
~ John Tukey
///////////////////////////////////////////////////////////////////////////////////////////
<https://www.inbo.be>
Op di 16 aug. 2022 om 12:01 schreef Dario Strbenac via R-devel <
r-devel using r-project.org>:
> Good day,
>
> It appears that class2 needs to be of length 1.
>
> > is(4, c("data.frame", "DataFrame"))
> Error in is(4, c("data.frame", "DataFrame")) :
> length(class2) == 1L is not TRUE
>
> However, the documentation is "class1, class2: character strings giving
> the names of each of the two classes between which is relations are to be
> examined"
>
> Also, class1 is not a parameter of the is function. It is a parameter of
> the extends function. I think the mention of "is relations" is unintended.
> Can the documenation be rewritten to remove the ambiguity for these?
>
> --------------------------------------
> Dario Strbenac
> University of Sydney
> Camperdown NSW 2050
> Australia
> ______________________________________________
> R-devel using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>
[[alternative HTML version deleted]]
More information about the R-devel
mailing list