roxygen Warning: : Missing name

roxygen examples
roxygen link
export function roxygen2
roxygen2 documentation examples
roxygen2 dataset documentation
r package documentation pdf
how to use importfrom in roxygen2
create r package roxygen2

So I'm trying to use roxygen2 to document my code. Unfortunately my supervisor felt it was cluttered having so many functions in the global environment. So I've been told to hide them away in sub environments. This seems to be stopping roxygen detecting them correctly. Minimal example below.

my_env <- new.env()

#' test
#' 
#' more test
#' 
#' @return none
my_env$my_func <- function(){}
environment(my_env$my_func) <- my_env

I'm using the Document() command in devtools to build the documentation. However I just keep getting the error "Warning: min_examp.R:8: Missing name". Given I don't think I'm going to be allowed to put the functions back the way they were before hiding them does anyone have any suggestions about how to get roxygen to detect my functions?

I was finally able to fix this by doing the following

my_env <- new.env()

#' my title
#' 
#' @name my_env$my_func
#' 
#' @usage my_env$my_func()
#' 
#' more test
#' 
#' @return none
my_env$my_func <- function(){}
environment(my_env$my_func) <- my_env

warning: missing name/title. Skipping · Issue #825 · r-lib/roxygen2 , But this gives the following warning for devtools::document() - Warning: foo2.Rd is missing name/title. Skipping. Is it possible in this case for  When using the following R code as the whole content of a single hello.R file residing in the R folder of a default package structure (e.g. the test package from Rstudio) a warning "Warning: @description [hello.R#1]: requires a value" is generated, when running roxygen using devtools::document(roclets=c('rd', 'collate', 'namespace')).

roxygen2can't find the name of your function.

Provide a name to your function like so

#' @name name_of_your_function

Unclear warning of missing @description value · Issue #710 · r-lib , R#1]: requires a value" is generated, when running roxygen using devtools::​document(roclets=c('rd', 'collate', 'namespace')). #' #' @name testClass #' @title  Currently, if you link to a function in another package that has an alias that points to a different Rd/html file, you end up with a missing file link warning when building the package. For example, if your documentation includes: #' Her

I was able to fix the issue by testing if all functions in the R folder can be run without error. Any buggy functions related to your "min_examp.R" are likely to generate the MISSING NAME error.

roxygen2 - CRAN, Text within roxygen blocks can be formatted using markdown or Rd commands; see vignette("rd-formatting") You can document multiple arguments in one place by separating the names with commas (no spaces). Should missing values (including `NaN`) #' be removed? occurs, the output #' will be NA with a warning. Roxygen templates. Roxygen templates are R files that contain only roxygen comments and that live in the man-roxygen directory. Use @template file-name (without extension) to insert the contents of a template into the current documentation. You can make templates more flexible by using template variables defined with @templateVar name value.

roxygen2 source: R/topics.R, In roxygen2: In-Line Documentation for R function() { for (topic in names(self$​topics)) { if (!self$topics[[topic]]$is_valid()) { warning(topic, " is missing name/title. #' @param argument_name description of the argument The line with @return contains a description of what the function returns. Here I just say “ None ,” but this could have a longer description, as in the Roxygen comments for the brocolors function .

Object documentation · R packages, Generated by roxygen2 (4.0.0): do not edit by hand \name{add} \alias{add} \title{​Add @section Warning: #' Do not operate heavy machinery within 8 hours of using this function. Should missing values (including NaN) #' be removed? Dismiss Join GitHub today. GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.

Changelog • roxygen2, The warning for @section titles spanning multiple lines now includes a hint that you're missing a colon (@maelle, #994). Can now Roxygen will no longer write out topics that don't have a name or title, and will instead generate a warning. * Update roxygen and regenerate. Mostly just whitespace changes and `code` -> `verb`. * R6 documentation for MockShinySession * Install roxygen from GH * % are now auto-escaped (We still need to go find the rest) * Fixed the ramining \% in roxygen Found looking for ^#'.*\\% in all R files, so I believe this is all of them.