work with the function str()

it is possible with the help of the function str(object, ...) only to show the attributes of data.table or data.frame.
I explain:
of this output

Classes ‘data.table’ and 'data.frame':	30 obs. of  3 variables:
 $ date  : Date, format: "2010-01-01" "2011-01-01" ...
 $ ind   : int  6 7 5 11 7 5 10 8 9 1 ...
 $ entity: chr  "a" "a" "a" "a" ...
 - attr(*, ".internal.selfref")=<externalptr> 
 - attr(*, "sorted")= chr  "entity" "date"

it is possible to only show

- attr(*, ".internal.selfref")=<externalptr> 
 - attr(*, "sorted")= chr  "entity" "date"

Does attributes() give you what you're looking for?

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.