Skip to content
Prev 388516 / 398513 Next

problem for strsplit function

My mental model for the `[` vs `[[` behavior is that `[` indexes multiple results while `[[` indexes only one item. If returning multiple items from a list the result must be a list. For consistency, `[` always returns a list when applied to a list. The double bracket drops the containing list.

The is.vector() behavior is not intuitive to me... I avoid that function, as I think it is more useful to think of lists as vectors than as something "other".
On July 9, 2021 3:44:29 PM PDT, Bert Gunter <bgunter.4567 at gmail.com> wrote: