#' @title Reveal the true data's position in a diagnostic parade
#'
#' @description This function reveals the position of the true data in a parade.
#'
#' @param parade The name of an object generated using the \code{\link{parade}}
#' or \code{\link{parade_summary}} function.
#' @export
#' @examples
#' # Fit model
#' m <- lm(mpg ~ disp, data = mtcars)
#'
#' # Generate parade
#' my_parade <- parade(m)
#'
#' # Linearity check
#' lin_plot(my_parade)
#'
#' # Reveal
#' reveal(my_parade)
reveal <- function(parade) {
if (is.null(attr(parade, "position"))) {
stop("The object you supplied doesn't seem to be a parade generated by the parade() function.")
}
message(paste0("The true data are in position ", attr(parade, "position"), "."))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.