% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/att_from_rscripts.R
\name{att_from_rscripts}
\alias{att_from_rscripts}
\title{Look for functions called with \code{::} and library/requires in folder of scripts}
\usage{
att_from_rscripts(
  path = "R",
  pattern = "*.[.](r|R)$",
  recursive = TRUE,
  folder_to_exclude = "renv",
  encoding = getOption("encoding")
)
}
\arguments{
\item{path}{directory with R scripts inside or vector of R scripts}

\item{pattern}{pattern to detect R script files}

\item{recursive}{logical. Should the listing recurse into directories?}

\item{folder_to_exclude}{Folder to exclude during scan to detect packages. 'renv' by default.}

\item{encoding}{Encoding passed to \code{\link[=readLines]{readLines()}} when reading \code{path}. Defaults
to \code{getOption("encoding")} so the system locale is respected (important on
Windows where scripts are often Latin-1 / Windows-1252).}
}
\value{
vector of character of packages names found in the R script
}
\description{
Look for functions called with \code{::} and library/requires in folder of scripts
}
\examples{
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))
}
