fasterRaster icon indicating copy to clipboard operation
fasterRaster copied to clipboard

proper linking

Open rhijmans opened this issue 10 months ago • 2 comments

Hi Adam,

I fixed a link in the convHull entry of the manual to that method in the "terra" manual. You were linking to a particular file

\link[terra:convhull]{terra::convHull()}}

You can link to the package::method like this

\link[terra]{convHull}}

That is a better approach, because it won't break if the filename changes. (I noticed this in a reverse dependency check). I assume you have many more of these.

Cheers, Robert

PS: I now see that you use Roxygen to generate these, so the PR is not very useful. I do not use Roxygen, but I assume you can fix it with that system as well.

rhijmans avatar Jan 05 '25 16:01 rhijmans

Hi Robert,

Thanks for noting this. Yes, I am using roxygen2, which creates the \link[package:method]{package::method()}}` pattern in the RD files, which I actually never edit. It looks like roxygen does this for any links to any methods in any package. Given >200 methods docs, I'm going to stay with the roxygen format until it breaks. But thank you for pointing this out.

Adam

adamlilith avatar Jan 05 '25 19:01 adamlilith

The reason that I reported it is that it was breaking --- that is how I detected it. I have reverted my change but that (and others) will happen eventually, and that creates additional work with CRAN submissions.

Can you use the below in convHull.r and tell Roxygen to not interpret it?

#' \seealso{ \link[terra]{convHull}, \link[sf]{st_convex_hull}, module `v.hull` in **GRASS**}

rhijmans avatar Jan 05 '25 20:01 rhijmans