由于某种原因pkgdown
,无法解析我的包中的 .Rd 文件之一。roxygen2
当我使用@examples
标签或@example inst/example/add.R
替代方法向文档添加示例时,我发现它失败了。我将我的函数最小化为两个参数,以使其更“可重复”并且仍然得到相同的错误。请在下面找到错误消息、使用该消息生成 devtools::document()
的 .Rd 文件以及该函数的 roxygen2 文档。如您所见,我正在使用一个非常简单的示例,该示例应该可以毫无问题地运行...还要说的是,当我运行devtools::check()
所有示例时,我都通过了,所以我不明白为什么pkgdown
会失败。
非常感谢你的帮助。
最好的,
错误信息
Reading 'man/merge.Rd'
Error : Failed to parse Rd in merge.Rd
i unused argument (output_handler = evaluate::new_output_handler(value = pkgdown_print))
Error: callr subprocess failed: Failed to parse Rd in merge.Rd
i unused argument (output_handler = evaluate::new_output_handler(value = pkgdown_print))
.Rd 文件
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/merge.R
\name{merge}
\alias{merge}
\title{Merge two tables}
\usage{
merge(x, y)
}
\arguments{
\item{x}{data frame: referred to \emph{left} in R terminology, or \emph{master} in
Stata terminology.}
\item{y}{data frame: referred to \emph{right} in R terminology, or \emph{using} in
Stata terminology.}
}
\value{
a data.table joining x and y.
}
\description{
This is the main and, basically, the only function in joyn.
}
\examples{
x <- c(1, 2)
}
roxygen2 文档
#' Merge two tables
#'
#' This is the main and, basically, the only function in joyn.
#'
#' @param x data frame: referred to *left* in R terminology, or *master* in
#' Stata terminology.
#' @param y data frame: referred to *right* in R terminology, or *using* in
#' Stata terminology.
#' @return a data.table joining x and y.
#' @export
#' @import data.table
#'
#' @examples
#' x <- c(1, 2)