Identifies the line number of the matching closing bracket for a given opening bracket.

find_closing(find = "}", line_no, file_in, if_else_check = FALSE)

Arguments

find

A character string of the opening bracket.

line_no

A numeric value indicating the line number to start the search.

file_in

A character vector of the file content.

if_else_check

Optional. A logical value indicating whether to check for if/else blocks (default is FALSE).

Value

A numeric value indicating the line number of the matching closing bracket.