Nothing
metrics_new <- function(
seconds = NULL,
warnings = NULL,
error = NULL,
error_class = NULL,
traceback = NULL,
cancel = NULL
) {
force(seconds)
force(warnings)
force(error)
force(error_class)
force(traceback)
force(cancel)
environment()
}
metrics_has_warnings <- function(metrics) {
!is.null(metrics$warnings)
}
metrics_has_error <- function(metrics) {
!is.null(metrics$error)
}
metrics_has_cancel <- function(metrics) {
!is.null(metrics$cancel)
}
metrics_terminated_early <- function(metrics) {
metrics_has_error(metrics) || metrics_has_cancel(metrics)
}
metrics_outcome <- function(metrics) {
if_any(
metrics_has_cancel(metrics),
"cancel",
if_any(metrics_has_error(metrics), "error", "completed")
)
}
metrics_validate <- function(metrics) {
tar_assert_correct_fields(metrics, metrics_new)
tar_assert_dbl(metrics$seconds)
tar_assert_scalar(metrics$seconds)
tar_assert_chr(metrics$warnings %|||% character(0))
tar_assert_chr(metrics$error %|||% character(0))
tar_assert_chr(metrics$error_class %|||% character(0))
tar_assert_chr(metrics$traceback %|||% character(0))
tar_assert_lgl(metrics$cancel %|||% FALSE)
invisible()
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.