I know that dotted pairlists aren't used outside of the core language for the most part, but I presumed they are used internally instead of generic vectors for a reason.
Why are pairlists used internally in R, and are there any performance benefits to using pairlists in your own functions?
To answer your second question, I don't think so. Section 2.1.11 from R documentation states this:
Pairlists are handled in the R language in exactly the same way as generic vectors (“lists”). In particular, elements are accessed using the same
[[]]
syntax. The use of pairlists is deprecated since generic vectors are usually more efficient to use. When an internal pairlist is accessed from R it is generally (including when subsetted) converted to a generic vector.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With