A Rmd that runs the function

knitr::opts_chunk$set(echo = TRUE)

To list information

Of course, you can also use {attachment} out of a package to list all package dependencies of R scripts using att_from_rscripts() or Rmd files using att_from_rmds().
If you are running this inside a Rmd, you may need parameter inside_rmd = TRUE.

dummypackage <- system.file("dummypackage", package = "attachment")

att_from_rscripts(path = dummypackage)
att_from_rmds(path = file.path(dummypackage, "vignettes"), inside_rmd = TRUE)


Try the attachment package in your browser

Any scripts or data that you put into this service are public.

attachment documentation built on June 7, 2023, 5:19 p.m.