I was wondering, how can I fix a piece text()that always appears above the bracket (or points()etc.) in a dynamically changing plot? In other words , how to define “x” and “y” for this piece of text following the parenthesis (or points()etc.) anywhere in the section? ( see my R code below )
As an example, suppose I have a bracket in the chart below, whose position (xs and ys) will always be known no matter how the plot changes. Here, how can I fix the position text()above this bracket (as shown in the graph) no matter where the bracket is?
PS At first I thought that I could take the "y" brackets, and then make the "y" from the text()following: ( "y" brackets +.1 * "y" brackets ). But, given that the graph can change dynamically (that is, the graph is associated with a function), the +.1 * "y" brackets in any plot give a different position for the text, which does not guarantee that the distance between the text and the bracket will always be maintained .

Here is the R code snippet:
if(!require(library(pBrackets))){install.packages('pBrackets') }
library(pBrackets)
plot(1:10, ty = 'n')
brack <- brackets(x1 = 4, y1 = 6, x2 = 8, y2 = 6, h = 1, ticks = .5, curvature = .5,
type=1, col = "blue",
lwd = 2, xpd = T)
text(x = 6, y = 7.2, "Equivalent to ZERO", font = 2)