for some reason pkgdown
is failing to parse one of the .Rd files that I have in my package. I found it fails when I add examples to the roxygen2
documentation using either the @examples
tag or the @example inst/example/add.R
alternative. I minimized my function to two arguments in order to make it more "reproducible" and still getting the same error. Please find bellow the error message, the .Rd file generated using that devtools::document()
and the roxygen2 documentation of the function. As you can see I am using a very simple example that should run with no problems... One more thing to say is that when I run devtools::check()
all my examples pass, so I don't understand why pkgdown
is failing.
Thank you so much for your help.
Best,
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))
% 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)
}
#' 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)
This error comes from downlit::evaluate_and_highlight
(sad it's not reported in the output), and can be fixed by installing the development version of downlit
:
library(devtools)
install_github('r-lib/downlit')
It make sense only if you use the git version also from pkgdown
, the stable pkgdown
(version 1.6.1) runs just fine with the stable downlit
. Of course development version of any package can break at any time, but until it doesn't, it's just alright.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With