#' Search Stack Overflow (SOS)
#'
#' Grabs last error message and searches it on stackoverflow.com
#'
#' @export
#'
#' @examples
#' sos()
sos <- function() {
last_error <- geterrmessage()
if (is.null(last_error)) {
stop("No error message available")
}
query <- utils::URLencode(paste("[r]", last_error))
utils::browseURL(paste0("http://stackoverflow.com/search?q=", query))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.