If there are no existing methods, s4_methods_class, as a wrapper of utils::methods,
is not expected to throw an error:
setClass("virtualA", contains = "VIRTUAL")
s4_methods_class("virtualA")
#> Error in `$<-.data.frame`(`*tmp*`, class, value = "virtualA") :
# replacement has 1 row, data has 0
However,
attr(utils::methods(class = "virtualA"), "info")
#> [1] visible from generic isS4
# <0 rows> (or 0-length row.names)
Maybe sloop:::methods_class can do a check for row number or other way to avoid the error...
If there are no existing methods,
s4_methods_class, as a wrapper ofutils::methods,is not expected to throw an error:
However,
Maybe
sloop:::methods_classcan do a check for row number or other way to avoid the error...