I have been using devtools for a while now, and I have found it has been fantastic. I have found one bug which I think might be worth flagging up.
I have found that there is a problem if you use #' to create multi-line comments within your functions, for example:
#' Title of My Function
#'
#' Function description
#'
#' @param param1
#' @param param2
#' @param param3
#'
#' @return
#' @export
#'
#' @examples
#'
#' bar <- "foo"
my_test_function <- function(param1, param2, param3){
#' Multi
#' line
#' comment
print("my test function")
}
What I have found is, if I run devtools::check(), I will get the following error:
base::assign(".ptime", proc.time(), pos = "CheckExEnv")
### Name: load_all_db_units
### Title: Load all db units
### Aliases: load_all_db_units
### ** Examples
loop over the possible list of unit conversion csv file names
Error: unexpected symbol in "Multi"
Execution halted
This is remedied when I replace #' with # within the function.
It's absolutely fine if #' is not allowed within function, but it may
be useful to have a warning/error which tells the user that the
issue is with the type of comment used, and not with the actual
examples they have made.
I have been using devtools for a while now, and I have found it has been fantastic. I have found one bug which I think might be worth flagging up.
I have found that there is a problem if you use
#'
to create multi-line comments within your functions, for example:What I have found is, if I run
devtools::check()
, I will get the following error:This is remedied when I replace
#'
with#
within the function. It's absolutely fine if#'
is not allowed within function, but it may be useful to have a warning/error which tells the user that the issue is with the type of comment used, and not with the actual examples they have made.Thanks so much!