[R] [EXTERNAL] Re: unexpected 'else' in " else" (Ebert, Timothy Aaron)

Jorgen Harmse JH@rm@e @end|ng |rom roku@com
Mon Oct 24 18:53:03 CEST 2022

I agree that the documentation should be clarified. Moreover, my last example shows that the class can be different even when no mode coercion is required. I don't know enough about S3 & S4 to comment on your last point.

Jorgen Harmse.

From: Bert Gunter <bgunter.4567 using gmail.com>
Date: Monday, 24October, 2022 at 11:31
To: Jorgen Harmse <JHarmse using roku.com>
Cc: r-help using r-project.org <r-help using r-project.org>
Subject: [EXTERNAL] Re: [R] unexpected 'else' in " else" (Ebert,Timothy Aaron)

So it would appear that the ifelse() documentation needs to be
clarified. For example, if the above asterisked phrase were "The S3
*class* of the answer will be inferred from the mode, where the mode
of the answer will be coerced ..." that might resolve at least that
bit of confusion However, that might also be incorrect -- what about
S4 vs S3 vs Reference classes, for example (are such cases even
possible?)? I leave resolution of these matters -- or at least their
accurate and complete documentation -- to wiser heads.



> > ifelse(integer(0L)) # test is an empty vector of integers and yes & no are missing.
> logical(0)

	[[alternative HTML version deleted]]

More information about the R-help mailing list