check_credentials: Check if an object is a service for which credentials are...

View source: R/check_credentials.R

check_credentialsR Documentation

Check if an object is a service for which credentials are saved in the user profile

Description

Check if credentials are saved in the user profile for the service.

Usage

check_credentials(x)

assert_credentials(
  x,
  .var.name = checkmate::vname(x),
  comment = NULL,
  add = NULL
)

Arguments

x

[any]
Object to check.

.var.name

[character(1)]
Name of the checked object to print in error messages. Defaults to the heuristic implemented in vname.

comment

[character(1)]
Extra information to be appended to the standard error message in assertions.

add

[AssertCollection]
Collection to store assertions. See AssertCollection.

Value

Depending on the function prefix:
If the check is successful, the function assert_credentials return x invisibly, whereas check_credentials return TRUE.
If the check is not successful, assert_credentials throws an error message and check_credentials returns a string with the error message.

Examples

check_credentials(x = "PJS")

PetterHopp/NVIcheckmate documentation built on Dec. 15, 2024, 12:49 a.m.