#' @title Read URL
#'
#' @description makes sure the connection is good, if so, returns xml material, otherwise returns NA
#' @keywords HTML, XML
#' @export
#' @examples
#' readUrl()
readUrl <- function(url) {
out <- tryCatch(
{
xml2::read_html(url)
},
error=function(e) {NA}
)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.