brshallo / funspotr

R function spotter, identifies the functions and packages in files.
https://brshallo.github.io/funspotr/
Other
61 stars 0 forks source link

Bug: Inconsistent behaviour with library(pkg) and library("pkg") #18

Closed ppoyk closed 1 year ago

ppoyk commented 1 year ago

It appears as if the function spot_funsfiles (and likely other spot* functions) are not able to identify the originating package for a function if it has been loaded in a script using library("pkg") function call, even though including the quotes is also a correct form.

When the library call was changed to library(pkg), the pkgs-column in the table produced by the code below was correctly populated, and didn't contain fields with an (unknown) -value

My code to check for depencencies was the following:

tmp <- funspotr::list_files_wd(here::here())
deps <- funspotr::spot_funs_files(tmp[1:4, 2])
deps <- funspotr::unnest_results(deps)
View(deps)
brshallo commented 1 year ago

Thanks, should be fixed with 0dea59f