get_text_annotation {expirest} | R Documentation |
Prepare text annotation
Description
The function get_text_annotation()
prepares a data frame for putting
text on a plot prepared by the ggplot()
function from the
‘ggplot2
’ package.
Usage
get_text_annotation(
model,
rvu,
x_range,
y_range,
rl_index = NULL,
plot_option = "full",
mtbs = "verified"
)
Arguments
model |
An ‘ |
rvu |
A character string that specifies the unit associated with the response variable. |
x_range |
A numeric vector of the form |
y_range |
A numeric vector of the form |
rl_index |
A positive integer that specifies which of the release limit
values that have been handed over to |
plot_option |
A character string of either |
mtbs |
A character string that specifies the “model to be shown”,
i.e. either |
Details
The function get_text_annotation()
expects various pieces
of information characterising an ‘expirest_osle
’ or an
‘expirest_wisle
’ model. With this information, the function
prepares a data frame that that is used by the functions
plot_expirest_osle()
or plot_expirest_wisle(
))
to put text annotations on the graph that is prepared by these functions.
Value
A data frame with the columns ‘Time’, ‘Response’,
Label and Colour is returned, where the column names ‘Time’ and
‘Response’ are placeholders for the corresponding variable names.
If model
is an ‘expirest_osle’ object, the data frame has up
to three rows representing the relevant specification limit(s) (row 1 or
rows 1 and 2) and the POI obtained from ordinary shelf life estimation (row
2 or 3). If model
is an ‘expirest_wisle’ object, the data
frame has up to seven rows representing the relevant specification limit(s),
the worst case scenario limit (row 2 or 3), the intercept (row 3 or 4), the
POI of the worst case scenario model (row 4 or 5), the POI obtained from
ordinary shelf life estimation (row 5 or 6) and the release limit (row 6
or 7).
See Also
plot_expirest_osle
, plot_expirest_wisle
,
print_val
, ggplot
,
geom_text
.