att_from_rscripts: Look for functions called with '::' and library/requires in...

Description Usage Arguments Value Examples

View source: R/att_from_rscripts.R

Description

Look for functions called with '::' and library/requires in folder of scripts

Usage

1
att_from_rscripts(path = "R", pattern = "*.[.](r|R)$", recursive = TRUE)

Arguments

path

directory with R scripts inside or vector of R scripts

pattern

pattern to detect R script files

recursive

logical. Should the listing recurse into directories?

Value

vector of character of packages names found in the R script

Examples

1
2
3
4
5
dummypackage <- system.file("dummypackage",package = "attachment")
# browseURL(dummypackage)

att_from_rscripts(path = file.path(dummypackage, "R"))
att_from_rscripts(path = list.files(file.path(dummypackage, "R"), full.names = TRUE))

attachment documentation built on Nov. 16, 2021, 9:17 a.m.