Learn R Programming

nuggets (version 1.4.0)

format_condition: Format a vector of predicates into a string with a condition

Description

Function takes a character vector of predicates and returns a formatted condition. The format of the condition is a string with predicates separated by commas and enclosed in curly braces.

Usage

format_condition(condition)

Value

a character scalar with a formatted condition

Arguments

condition

a character vector of predicates to be formatted

Author

Michal Burda

Examples

Run this code
format_condition(NULL)              # returns {}
format_condition(c("a", "b", "c"))  # returns {a,b,c}

Run the code above in your browser using DataLab