Skip to content
Prev 19871 / 63424 Next

levels for list and data.frame

oops, this does not pass R CMD check. I will have to read manuals a bit
more.

...
* checking S3 generic/method consistency ... WARNING
levels:
  function(x, ...)
levels.list:
  function(x, drop)

levels:
  function(x, ...)
levels.data.frame:
  function(x, drop)
...

Anyway, I would like to ask what is the "opinion" about writing methods
for classes as list and data.frame. Methods for this might not be as
simple as for numeric, character, factor and it would be nice that there
would be some guidelines for at least:
- what should be the "general" output i.e. list or something else - I
understand that it is hard to say in advance, but a common policy might
not hurt
- what to do if a method for a list or data.frame can not be applied to
each entry/column