I wanted to follow up.
A more careful reading of the following:
"A vector of the same length and attributes (including dimensions and
"class") as test..."
So the above **refers only to a "class" attribute that appears among
the attributes of test and result**. Using my previous example, note
"...but 'same length and attributes (including dimensions and
‘"class"’) as ‘test’' looks wrong. The output seems to be `logical` or
something related to the classes of `yes` & `no`."
The documentation in fact says:
"A vector of the same length and attributes (including dimensions and
"class") as
There were several interesting points about `ifelse`. The usual behaviour seems
to be that all three inputs are evaluated, and the entries of `yes`
corresponding to `TRUE` in `test` are combined with the entries of `no`
corresponding to `FALSE` in `test`. Moreover, `yes` & `no` seem to be
3 matches
Mail list logo