-
Notifications
You must be signed in to change notification settings - Fork 235
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
roxygen2 reported error after upgrade from 6.1.1 to 7.0.2 #1008
Comments
Hi, this is because you have
here: https://github.com/genomaths/MethylIT/blob/ddec3eb401b31820ffd31dd9eb469781611da3f7/R/ggamma.R#L74 and also elsewhere. roxygen2 should give a better error message though. What are you trying to achieve by setting the description tag to |
Actually if there is another |
Here is a small reprex: roxygen2::roc_proc_text(roxygen2::rd_roclet(), "
#' Title
#'
#' @description desc1
#' @description NULL
foo <- function() NULL
")[[1]]
#> Error in if (self$has_section(type) && !overwrite) {: missing value where TRUE/FALSE needed Created on 2019-12-13 by the reprex package (v0.3.0) |
But actually, even this fails: roxygen2::roc_proc_text(roxygen2::rd_roclet(), "
#' Title
#'
#' @description NULL
foo <- function() NULL
")[[1]]
#> Error in if (self$has_section(type) && !overwrite) {: missing value where TRUE/FALSE needed Created on 2019-12-13 by the reprex package (v0.3.0) |
@hadley it seems that having
|
I think warn and drop the tag so you get the default behaviour? |
Yeah, that makes sense. I'll submit a PR. |
OK, so there is actually a case when suppressing
So for these we should not warn, and should not drop either, I guess, because |
@gaborcsardi supporting that seems relatively low priority to me. |
@hadley Right, I agree. OTOH we already have an exception for re-exports pages, and supporting it is a one line change. |
Now they are ignored, except for `@description NULL` in package level documentation, where it can be used to suppress the auto-generated Description section Closes #1008.
Hi guys Thank you very much for your answers. I really appreciate it. In the case of ggamma probability distribution function, where I just write down the four statistical functions dggamma, pggamma, rggamma, and qggamma in the same file, it does not makes sense to me the repetition of the content for \description and \details sections four times. I mean, if I must do it to prevent the error, then I will do it. However, as @gaborcsardi suggests, if you can introduce the flexibility to go with the option NULL or something similar, then that will be great. This is the application of "Minimum writing code principle", the code version of "Ockham's razor principle" :-) Please let me know if @gaborcsardi pull request went through. Best, |
roxygen2 will not repeat a section just because the page documents multiple functions. You can just remove the |
I do remember when I wrote the first version of the ggamma function (using old version of roxygen2), I was forced to introduce these sections and to write NULL solved the problem. Perhaps, I did something wrong at that time that force me to do it. Anyway, I will follow your suggestion. Thank you very much for your support |
Now they are ignored, except for `@description NULL` in package level documentation, where it can be used to suppress the auto-generated Description section Closes #1008.
Now they are ignored, except for `@description NULL` in package level documentation, where it can be used to suppress the auto-generated Description section Closes #1008.
Hi there
I have been using roxygen2 6.1.1 for all my R packages. Now after upgrade roxygen2 to version 7.0.2, I got the following error:
Error in if (self$has_section(type) && !overwrite) { : missing value where TRUE/FALSE needed
I reinstalled the old version 6.1.1 to keep updating the projects.
Since I focus my attention on the maths and not in the documentation, perhaps I am missing some important detail.
You can check the project https://github.com/genomaths/MethylIT/tree/MethylIT_0.3.2_beta (roxygen2 6.1.1)
Would you please give me some tip on how to solve this problem?
Best,
Robersy
The text was updated successfully, but these errors were encountered: