get_deps: Get Package Dependencies

View source: R/get_deps.R

get_depsR Documentation

Get Package Dependencies

Description

Get Package Dependencies

Usage

get_deps(path)

Arguments

path

character vector of length one having the directory path to where new version of the custom package exists. This can be the full path name of the directory in which the package exists or the full path name of the source version of the package.

Value

Character vector of package dependencies based on the contents of the DESCRIPTION file.

Written by Josh O'Brien on stackoverflow on May 13 '15 at 21:42

Examples

## Not run: 
library(rmsutilityr)
## Directory where package is placed when installed.
dependencies <- get_deps("c:/R library/snprcspf")
## Source file of package
dependencies <- get_deps("c:/R data/snprcspf.1.0.1.tar.gz")
remove_these <- c("stats", "tools", "utils", "rmsutilityr", "animalr")
dependencies <- remove_these_str(dependencies, expunge = remove_these)
repo <- "https://cran.revolutionanalytics.com" ## or your mirror of choice
lib_path <- "c:/R Library/"
install.packages(dependencies, type = "binary", repos = repo, lib = lib_path)

## End(Not run)

rmsharp/rmsutilityr documentation built on Feb. 13, 2024, 6:01 p.m.