S3 method consistency warning when building R package with Roxygen

后端 未结 1 1170
陌清茗
陌清茗 2020-12-29 19:49

I have created a roxygen file for a function that uses S3 an class. I roxygenize and then build and check and get a warning:

* checking S3 generic/method co         


        
1条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-29 20:41

    I think this happens because a method must have all the same arguments as the generic. So add ... to the arguments of common.list(). Like this:

    common.list <- function(word.list, overlap = "all", equal.or = "more", ...)
    

    Similarly, common.default() should have word.list as an argument.

    0 讨论(0)
提交回复
热议问题