load_all_file: Generate a Loading Script for Development Packages

View source: R/devutils.R

load_all_fileR Documentation

Generate a Loading Script for Development Packages

Description

Writes a script file that contains code that loads a given development package.

Usage

load_all_file(path = path.package(package), package, dest = NULL)

Arguments

path

a character string that contains the path to the development package.

package

the name of the package for which the loading script must be generated. It must be a package that has already been loaded with devtools::load_all in the current session, so that its path can be retrieved.

dest

the path to script file to create (as a character string). If not provided, then the script is written in a temporary .R file with prefix "load_all_<pkgname>_".

Details

This is useful when we want to load a development package in batchtools registries:

library(devtools)
library(batchtools)

load_all("path/to/pkgA")
makeRegistry(..., source = load_all_file("pkgA"))

Value

a character string that contains the path to the script file.


pkgmaker documentation built on May 3, 2023, 5:08 p.m.