data.table::setattr, but in the case where there is
only a single element within a list attribute.
.setSubAttrInList(object, attr, subAttr, value)
An arbitrary object
The attribute name (that is a list object) to change
The list element name to change
The new value
This sets or updates the
subAttr element of a list that is located at
attr(object, attr), with the
value. This, therefore, updates a sub-element
of a list attribute and returns that same object with the updated attribute.