This is an internal helper function to calculate and label
the percentage of a posterior distribution that falls within
the Region of Practical Equivalence (ROPE) or
at or beyond a Minimally Important Difference (MID).
It is designed to fail gracefully if no window given, and to
give some useful labels about the windows / range used.
Intended for use internally as part of brmsmargins().
.percent(x, window = NULL, within = TRUE)A list with the Window, if specified else NULL,
the Percent of observations, and a Label specifying the
exact window used in human readable format.
A vector of values to evaluate. Required.
An optional numeric vector giving a window.
A logical value indicating whether to calculate the
percentage within the window (if TRUE) or the
percentage at or outside the window (if FALSE).
Defaults to TRUE.