2

.Rファイルから.Rdroxygen2::roxygenise()ファイルdevtools::document()を生成するために使用できることを知っています。

たとえば、Test.Rが次の場合

#' Add together two numbers
#'
#' @param x A number
#' @param y A number
#' @return The sum of \code{x} and \code{y}
#' @examples
#' add(1, 1)
#' add(10, 1)
add <- function(x, y) {
  x + y
}

次に、 roxygen2::roxygenise()またはの出力は次のdevtools::document()ようになります

% Generated by roxygen2 (3.2.0): do not edit by hand
\name{add}
\alias{add}
\title{Add together two numbers}
\usage{
add(x, y)
}
\arguments{
  \item{x}{A number}

  \item{y}{A number}
}
\value{
The sum of \code{x} and \code{y}
}
\description{
Add together two numbers
}
\examples{
add(1, 1)
add(10, 1)
}

しかし、私はその逆に興味があります。.Rファイルに変換したい .Rd があります何かご意見は!

4

1 に答える 1