GeoBosh / Rdpack

R package Rdpack provides functions and macros facilitating writing and management of R documentation.
https://geobosh.github.io/Rdpack/
28 stars 6 forks source link

partial argument match of key to keys #28

Closed LiNk-NY closed 2 years ago

LiNk-NY commented 2 years ago

Hi @GeoBosh

It looks like the insertCite hook is using a partial argument.

I couldn't find it in the code but when testing a package with \insertCite{...}, I get the following warning:

Warning in Rdpack::insert_citeOnly(key = "wu2012camera", package = "zenith",  :
  partial argument match of 'key' to 'keys'

Best, Marcel

GeoBosh commented 2 years ago

Thanks for the report. Could you give more details/context, i.e. what exactly were you doing and with which R version? Is this when you build/install/check? Is this package https://github.com/GabrielHoffman/zenith/.?

GeoBosh commented 2 years ago

Indeed, the definitions of the Rdmacros in man/macros call insert_citeOnlywithkeyrather thankeys`. I will fix this.

I don't get the warning though. I updated R-devel to the most recent one, 82650, and tried several packages which use this macro with no warnings when building/checking/installing. Do you get the warning when using ?xxx in Rstudio or something similar?

LiNk-NY commented 2 years ago

Thank you Georgi, @GeoBosh

I have these options in my ~/.Rprofile:

options(
    warnPartialMatchAttr = TRUE,
    warnPartialMatchDollar = TRUE,
    warnPartialMatchArgs = TRUE
)
GeoBosh commented 2 years ago

Very professional.:) Thank you Marcel, @LiNk-NY for reporting it. I fixed this issue with commit 672591b.

LiNk-NY commented 2 years ago

Great! Thank you for taking care of this so quickly!

Best regards, Marcel