Skip to content
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

unexpected missing links in documentation object #973

Closed
IndrajeetPatil opened this issue Nov 16, 2019 · 12 comments
Closed

unexpected missing links in documentation object #973

IndrajeetPatil opened this issue Nov 16, 2019 · 12 comments
Labels
bug rd ✍️
Milestone

Comments

@IndrajeetPatil
Copy link
Contributor

@IndrajeetPatil IndrajeetPatil commented Nov 16, 2019

In some functions in my package, I am inheriting arguments from lme4::lmer and lme4::glmer-

#' @inheritDotParams lme4::lmer

This works without any issue:
Source: https://indrajeetpatil.github.io/groupedstats/reference/grouped_lmer.html#arguments

image

But it is producing a WARNING in my R CMD CHECK-

> checking Rd cross-references ... WARNING
 
  Missing link or links in documentation object 'grouped_lmer.Rd':
    '[lme4]{list}' '[lme4]{offset}' '[lme4]{model.offset}'
  
  See section 'Cross-references' in the 'Writing R Extensions' manual.

This is not supposed to happen because this is not a reference in code, but in the documentation.

As @bbolker pointed out, this might be a roxygen2 buglet?
(specifically, here:

roxygen2/R/rd-inherit.R

Lines 188 to 190 in e016a70

src <- inheritors$source
dest <- ifelse(has_colons(src), gsub("::", ":", src), paste0("=", src))
from <- paste0("\\code{\\link[", dest, "]{", src, "}}", collapse = ", ")
)

@hadley

This comment has been minimized.

@IndrajeetPatil

This comment has been minimized.

@bbolker

This comment has been minimized.

@IndrajeetPatil

This comment has been minimized.

@bbolker

This comment has been minimized.

@hadley

This comment has been minimized.

@bbolker

This comment has been minimized.

@hadley

This comment has been minimized.

@hadley
Copy link
Member

@hadley hadley commented Nov 20, 2019

Minimal reprex:

rd <- roxygen2:::parse_rd("\\code{\\link{model.offset}}")
roxygen2:::tweak_links(rd, "lme4")
#> \code{\link[lme4]{model.offset}}

Created on 2019-11-20 by the reprex package (v0.3.0)

@hadley
Copy link
Member

@hadley hadley commented Nov 20, 2019

And the root cause is this:

roxygen2:::has_topic("model.offset", "lme4")
#> [1] TRUE

Created on 2019-11-20 by the reprex package (v0.3.0)

@hadley hadley added bug rd ✍️ labels Nov 20, 2019
@hadley hadley added this to the v7.0.1 milestone Nov 20, 2019
@leobelen
Copy link

@leobelen leobelen commented Jul 11, 2020

This error is still happening. Is there any updates?

@gaborcsardi
Copy link
Collaborator

@gaborcsardi gaborcsardi commented Jul 11, 2020

This is a closed issue. If you think that this is still not fixed, please open another issue with an example. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug rd ✍️
Projects
None yet
Development

No branches or pull requests

5 participants