# NOT RUN {
warning_in_middle <- function() {
message("It's time!")
Sys.sleep(1)
invisible("done")
}
if (requireNamespace("beepr", quietly = TRUE) == TRUE) {
catch_expr(warning_in_middle(),
message = c(beep_with(2), display, muffle))
# Or you can just use the default sound with "beep":
# catch_expr(warning_in_middle(), message = c(beep, display, muffle))
}
# }
Run the code above in your browser using DataLab