lib.packs_vec2str: Convert package name/version vector to single string.

View source: R/VC_library_writing.R

lib.packs_vec2strR Documentation

Convert package name/version vector to single string.

Description

Used to print a set of package names and their version criteria in a way that lib.packs_str2vec() can parse it again to a package vector. This way we can list the dependencies of a function easily and support command line interaction for example.

Usage

lib.packs_vec2str(x, do_return = FALSE)

Arguments

x

A named character vector with package names/versions. c(dplyr = '>= 1.5.0', data.table = '')

do_return

If FALSE (the default) the package sting is printed, if TRUE, it is returned as a character string and not printed.

Value

When do_return = TRUE, returns a character string that describes a vector with packages and their version specifications like "dplyr (>= 1.5.0), data.table". When FALSE, it prints this string and returns nothing.


multiversion documentation built on March 22, 2022, 1:07 a.m.