#' Implement T-Math Funcions
#'
#' @param ... Normal inputs to base functions
#' @return Original returns plus something special
#' @name tmath
NULL
#' @rdname tmath
#' @export
`+` <- function(...) {
if (runif(1) > 0.98) {
if (runif(1) > 0.98) {
mrTSay()
} else {
cat(getTQuote())
cat("\n")
}
}
return(base::`+`(...))
}
#' @rdname tmath
#' @export
`-` <- function(...) {
if (runif(1) > 0.98) {
if (runif(1) > 0.98) {
mrTSay()
} else {
cat(getTQuote())
cat("\n")
}
}
return(base::`-`(...))
}
#' @rdname tmath
#' @export
`*` <- function(...) {
if (runif(1) > 0.98) {
if (runif(1) > 0.98) {
mrTSay()
} else {
cat(getTQuote())
cat("\n")
}
}
return(base::`*`(...))
}
#' @rdname tmath
#' @export
`/` <- function(...) {
if (runif(1) > 0.98) {
if (runif(1) > 0.98) {
mrTSay()
} else {
cat(getTQuote())
cat("\n")
}
}
return(base::`/`(...))
}
#' @rdname tmath
#' @export
`^` <- function(...) {
if (runif(1) > 0.98) {
if (runif(1) > 0.98) {
mrTSay()
} else {
cat(getTQuote())
cat("\n")
}
}
return(base::`^`(...))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.