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):
renaming the function
renaming the file it's saved in
adding it to a different file in the R folder
change it to internal (#' @keywords internal )
taking out all the R code within it (to see if something funky was going on)
I've pulled it out of it's call in the other function
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. 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.
Now let me look for the source of the actual problem
Actually one of your first guesses was right, .Rbuildignore
seems guilty, if I change
ci/*
to
^ci/*
I no longer get the warning. (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
(or sometimes .gitignore
rOpenSci | A Blend of Package Build Failures )
1 Like
system
Closed
July 15, 2022, 2:19pm
7
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.