I begin to learn how to use roxygen, so I found this post by @hadley and go down to this tutorial page: http://r-pkgs.had.co.nz/man.html
For doing the first example, I created a new project and a new test.R file.
I copied these example code to 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
}
After that, I run in console:
devtools::document()
But I got an error message:
Error: No description at D:\Conny\RStudio\try/DESCRIPTION
What I did wrong? Even I manually created "DeSCRIPTION" file, it still doesn't work.