ONE function giving a undocumented WARNING

I've got a package that has 1 and only 1 function that no matter what I do with it, it gives me "WARNING Undocumented code objects: ".

Here's the function:

here's the Rd file:

here's where it sits in the NAMESPACE:

it's only used in the package here:

I get the warning locally and on our CI job:

I've tried (and between each step I delete ALL the files in the man folder just in case, forcing it to regenerate everything):

  1. renaming the function
  2. renaming the file it's saved in
  3. adding it to a different file in the R folder
  4. change it to internal (#' @keywords internal )
  5. taking out all the R code within it (to see if something funky was going on)
  6. I've pulled it out of it's call in the other function
  7. I don't see anything in the .Rbuildignore that would be hiding the file....

Always this 1 particular function gives me this warning... this function is going to drive me bonkers.:woozy_face: Has anyone ever come across this?

First remark (not solving the issue)

Since version 7.2.0 roxygen2 looks for multiparagraph title so the title and description are probably not what you want (edit: which means it should actually warn you?)

\title{precipDaily
 
Creates normalized precip}

I'm not sure whether you should add @description before the description or whether this is a bug. :thinking:

Now let me look for the source of the actual problem :sweat_smile:

Actually one of your first guesses was right, .Rbuildignore seems guilty, if I change

ci/*

to

^ci/*

I no longer get the warning. :exploding_head: (I get an error checking examples but that's probably another story)

I opened an issue to ask behaviour of roxygen2 for the first two paragraphs in an R file ยท Issue #1385 ยท r-lib/roxygen2 ยท GitHub

so

#' precipDaily
#'  
#' Creates normalized precip

should be

#' precipDaily
#'
#' Creates normalized precip

(removing the space signs that are after the roxygen comment on the second line). Thanks @Gabor for spotting this!

Oh my gosh...thanks so much! This was driving me insane! Noticing those spaces also fixes some formatting questions I've had on some other packages! So double thanks!

1 Like

It's ALWAYS the .Rbuildignore :joy: (or sometimes .gitignore rOpenSci | A Blend of Package Build Failures :sweat_smile: )

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.