Often times, when I'm using different 3rd party functions, said functions will return some useful data structure that stores a lot of data that I can retrieve with .. Let's say, for example, I'd like to return two data frames, Red and Blue.
I'd like for the user to be able to do something like:
stuff <- this_nice_function()
stuff.Red$column_name
stuff.Blue$column_name
As a bonus, if said user were to just write stuff into the console, I'd like an output like...
This contains two data.frames, Red and Blue.
Red is size [x]. Blue is size [y]
Available fields: Red, Blue
(Or something like this, similar to the output of dbscan)
I've looked around quite a bit, but the . related threads are focused on the usage of . in a function argument.