as_vector {checkglobals}R Documentation

Cast to list vector generic

Description

as_vector is a generic function to cast objects returned by checkglobals, check_pkg or check_source to list vectors. The function invokes particular methods which depend on the class of the first argument.

Usage

as_vector(x, pattern, which, ...)

Arguments

x

an S3-object to convert.

pattern

an optional regular expression. Only names matching pattern are returned. glob2rx can be used to convert wildcard patterns to regular expressions.

which

a character vector, either "global" to print all unrecognized global variables, "import" to print all detected imported functions and variables, or both (default).

...

additional arguments to configure the returned output.

Value

a list of character vectors.


[Package checkglobals version 0.1.0 Index]