Skip to content
Prev 388511 / 398513 Next

problem for strsplit function

OK, I stand somewhat chastised.

But my point still is that what you get when you "extract" depends on
how you define "extract." Do note that ?"[" yields a help file titled
"Extract or Replace Parts of an object"; and afaics, the term "subset"
is not explicitly used as Duncan prefers. The relevant part of the
Help file says for "[" for recursive objects says: "Indexing by [ is
similar to atomic vectors and selects a list of the specified
element(s)."  That a data.frame is a list is explicitly stated, as I
noted; that lists are in fact vectors is also explicitly stated (?list
says: "Almost all lists in R internally are Generic Vectors") but then
one is stuck with: a data.frame is a list and therefore a vector, but
is.vector(d3) is FALSE. The explanation is explicit again in
?is.vector ("is.vector returns TRUE if x is a vector of the specified
mode having no attributes other than names. It returns FALSE
otherwise."). But I would say these issues are sufficiently murky that
my warning to be precise is not entirely inappropriate; unfortunately,
I may have made them more so. Sigh....

Cheers,
Bert



Bert Gunter

"The trouble with having an open mind is that people keep coming along
and sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
On Fri, Jul 9, 2021 at 3:05 PM Duncan Murdoch <murdoch.duncan at gmail.com> wrote: