sourcePackage: Source a package directory

View source: R/sourcePackage.R

sourcePackageR Documentation

Source a package directory

Description

Source all the R and Cpp file contain in a package

Usage

sourcePackage(
  name,
  path = pathGitHub(),
  trace = FALSE,
  r.package = TRUE,
  field = c("Imports", "Depends"),
  r.code = TRUE,
  r.order.collate = FALSE,
  onAttach = TRUE,
  onLoad = TRUE,
  c.code = FALSE,
  rebuild = FALSE,
  warning = TRUE
)

Arguments

name

[character] The name of the package.

path

[character] The path to the directory containing the package.

trace

[logical] Should the execution of the R and cpp files be traced?

r.package

[logical] Should the related R package be loaded.

field

[character vector] which type of dependency should be loaded? Only active if r.package it TRUE.

r.code

[logical] Should all the .R be sourced.

r.order.collate

[logical] Should the R files be sourced in the order indicate by collate.

onAttach

[logical] Source the .onAttach function if it is present in the current environment.

onLoad

[logical] Source the .onLoad function if it is present in the current environment.

c.code

[logical] Should all the .cpp file be source (using Rcpp::sourceCpp).

rebuild

[logical] Force a rebuild of the shared library (from Rcpp:::sourceCpp).

warning

[logical] Should a warning be displayed if some of the R files are not sourced.

Details

Used by emacs-config.

See Also

pathGitHub

Examples

## Not run: 
sourcePackage("butils")
sourcePackage("riskRegression")

## End(Not run)


bozenne/butils.base documentation built on May 13, 2024, 12:20 p.m.