
Which library() calls to add for a missing function
Source: R/reproducibility_check.R
dot-repro_missing_fn_pkgs.RdThe module's corrective re-run calls this for a script that failed with
could not find function "X" when no script of the paper defines X. In
order:
Details
When the paper's OTHER scripts attach a package that provides
X, all the packages those scripts attach are returned, in the order they attach them. Such a script was written to run after them, in the same session (typically withlibrary(tidyverse)in a script that runs first), and usually needs more than the one function that failed first: loading only magrittr for%>%would make the script fail one line later, on the first dplyr function.Otherwise, the one package among
candidatesthat exportsX(.repro_find_export_pkg()), as before.Otherwise, for
%>%when no script of the paper attaches a package that provides it,"magrittr".
A package provides X when it is installed here and exports X, or, for
%>%, when it is one of .repro_pipe_pkgs, or it is "tidyverse".