简体   繁体   中英

adding useDynLib through Roxygen

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(mypackage) call missing from the NAMESPACE file. How do I get this generated?

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM