function_exists: Check If A Function Exists

View source: R/functions.R

function_existsR Documentation

Check If A Function Exists

Description

Check if the function with the specified name exists in the specified database.

Usage

function_exists(sc, fn, database = NULL)

Arguments

sc

A spark_connection.

fn

character(1). The name of the function.

database

character(1). The name of the database for which the functions should be listed (default: NULL).

Details

function_exists() includes in-built functions such as abs. To see if a built-in function exists you must use the unqualified name. If you create a function you can use the qualified name. If you want to check if a built-in function exists specify the database as NULL.

Value

A logical(1) vector indicating TRUE if the function exists within the specified database and FALSE otherwise.

Examples

## Not run: 
sc <- sparklyr::spark_connect(master = "local")
function_exists(sc = sc, fn = "abs")

## End(Not run)


catalog documentation built on Aug. 23, 2022, 1:07 a.m.