Open DominiqueMakowski opened 5 years ago
You can define your own resp. overwrite the [ <-]
method, and then save the attributes. I did this once for parameters, so you can do something like parameters(...)[1:4]
for printing, but this messed up some other stuff (I can't remember) so I removed it again...
Here is an exampe [
method for a complex S3 class
https://github.com/psychmeta/psychmeta/blob/fb6816579db4f0878c5586520268ec38edee15a1/R/methods_dplyr_ma_psychmeta.R#L289
And this is because subsetting a dataframe removes all attributes for some reason (which I didn't know). I am not sure if they are any easy workarounds.