wrap_fun_in_all: Modify a user-defined function to return a single logical...

View source: R/type.frame.R

wrap_fun_in_allR Documentation

Modify a user-defined function to return a single logical value

Description

Modifies a user-defined function to wrap its body in an all() call, ensuring that it returns a single logical value instead of a vector.

It uses bquote() to create a new body for the function. The .() inside bquote() inserts the original body of the function. The all() function wraps around the original body.

Usage

wrap_fun_in_all(user_fun)

Arguments

user_fun

A user-defined function.

Value

The modified function.


interface documentation built on Sept. 11, 2024, 8:59 p.m.