luisDVA / annotater

Annotate Package Load Calls
https://annotater.liomys.mx/
Other
99 stars 2 forks source link

"no matching library load calls" despite package functions seeming to be used normally #13

Closed SimonDedman closed 2 years ago

SimonDedman commented 2 years ago

I used the "annotate each package's function calls" addin successfully a couple of times before this happened, but now this error happens on multiple files, but not all. Example scripts attached (change extension to R). Thanks!

EddyAppendAVISO3_LongFiles.txt

KUD.txt

luisDVA commented 2 years ago

Hi Simon, Thanks for raising this issue. I've found the problem. You have whitespace before your library() calls at the start of each line. This may or may not be intentional in your code, but the regexp that matches library load calls for all the functions in the package currently doesn't allow for anything other than "^library".

I'll fix this for the next release.

SimonDedman commented 2 years ago

Ah interesting. Certainly if called within a function the library() calls will indent that way naturally. Good job deducing the problem! Cheers!