R has two classes not so commonly used: "Dlist" and "namedList".
As regard the first, it is mentioned with respect to Sys.getenv()
, which returns a result of class "Dlist" if its argument is missing, for nice printing. There is in fact a print.Dlist
method for the class. There is also an apparently related formatDL
function to format description lists. However I do not know how to create an object of class "Dlist".
As regards "namedList", it is defined by the manual:
the alternative to "list" that preserves the names attribute
In this case I am unable to create an object of this type and I have not found any instance where it is used.
How do you create a "Dlist" or a "namedList"?
Can you provide an example where the "namedList" is more convenient of an ordinary named list? (intended as a list L
, where names(L)
is not NULL
)