sourcePackage: Source a package directory

Description Usage Arguments See Also Examples

View source: R/sourcePackage.R

Description

Source all the R and Cpp file contain in a package

Usage

1
2
3
4
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.

See Also

pathGitHub

Examples

1
2
3
4
5
## Not run: 
sourcePackage("butils")
sourcePackage("riskRegression")

## End(Not run)

bozenne/butils.base documentation built on April 1, 2020, 6:13 p.m.