简体   繁体   中英

roxygen2 failed to generate a proper .Rd file

I have a function such like this:

#' Multiple imputation for repeated binary outcomes
#'
#' @param data Data frame or matrix of multivariate binary outcome with missing values to impute, NA denotes missing values
#' @param cols NULL or a character or integer vector giving the columns for imputation
#' @param nprior integer
#' @param fprior.list a list of prior frequencies. See "Details"
#' @param burnin number of burnin iterations, NULL or positive integer
#' @param rep number of iterations for imputation, default is 10
#' @return list of imputed data frames
#' @export
#' @examples
#' data(polio)
#' milonga(polio, cols=2:7)

milonga<-function(data, cols=NULL, nprior=100, fprior.list=NULL, burnin=NULL, rep=10){
#omit
}

But when I build it using RStudio using Roxygen2 for generating documentation, I got below warning and error:

* installing to library ‘/home/dz33/R/x86_64-pc-linux-gnu-library/3.3’
* installing *source* package ‘milonga’ ...
** R
** data
*** moving datasets to lazyload DB
** preparing package for lazy loading
** help
Warning: /data/Private/UVA/SMMR/milonga/man/milonga.Rd:1: All text must be in a section
Error : /data/Private/UVA/SMMR/milonga/man/milonga.Rd: Sections \title, and \name must exist and be unique in Rd files
ERROR: installing Rd objects failed for package ‘milonga’
* removing ‘/home/dz33/R/x86_64-pc-linux-gnu-library/3.3/milonga’
* restoring previous ‘/home/dz33/R/x86_64-pc-linux-gnu-library/3.3/milonga’

Exited with status 1.

When I check the milonga.Rd which automatically generated by roxygen2, it just showed:

<environment: 0x3d234c0>

Does somebody know what's wrong?

Finally I found it's due to the Rproj was created on a network drive. RSudio does not support it at this time.

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