Learn R Programming

godley (version 0.2.2)

check_parentheses_balance: Verify if parentheses in the equation are properly balanced

Description

This function checks if all parentheses in a given equation string are correctly paired and balanced. If there are no parentheses, the equation is considered trivially balanced. It returns `TRUE` if the parentheses are balanced and `FALSE` otherwise.

Usage

check_parentheses_balance(eq)

Value

A logical value indicating whether the parentheses are balanced (`TRUE`) or not (`FALSE`).

Arguments

eq

A character string representing an equation.