Is there a way to find out which functions from which packages were called within *.rmd file ?
Something like function list.functions.in.file
from the {NCmisc}
package but for *.rmd files ?
Thank you for help.
Is there a way to find out which functions from which packages were called within *.rmd file ?
Something like function list.functions.in.file
from the {NCmisc}
package but for *.rmd files ?
Thank you for help.
Hi @Andrzej,
Not sure if you can do this directly, but you could extract all the R code from the .Rmd file first and then run list.functions.in.file()
on the resultant file. See:
https://bookdown.org/yihui/rmarkdown-cookbook/purl.html
HTH
Hi @DavoWW,
Thank you, this is working like a charm:
knitr::purl("main.Rmd")
list.functions.in.file("main.R")
and then in console there is a list of all functions that are inside "main.R" file:
I collected other resources for the sake of completeness:
https://stackoverflow.com/questions/20259681/how-to-list-all-the-functions-signatures-in-an-r-file/20260081#20260081
https://stackoverflow.com/questions/39815780/r-list-functions-in-file
best regards,
Andrzej
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.