adding useDynLib through Roxygen

后端 未结 1 1881
隐瞒了意图╮
隐瞒了意图╮ 2021-02-12 22:58

I am converting my packages to use roxygen documentation, through the roxygen2 package. Now my package does not load and I think that is is because of the missing useDynLib(myp

1条回答
  •  说谎
    说谎 (楼主)
    2021-02-12 23:35

    Start a package-level documentation file. In your example, R/mypackage.R that contains something like:

    #' mypackage: A package for computating the notorious bar statistic.
    #'
    #' The mypackage package provides three categories of important functions:
    #' foo, bar and baz.
    #' 
    #' @section Mypackage functions:
    #' The mypackage functions ...
    #'
    #' @docType package
    #' @name mypackage
    #' @useDynLib mypackage
    NULL
    #> NULL
    

    I also struggled for a bit to get .registration=TRUE. That is

    #' @useDynLib mypackage, .registration=TRUE
    

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