library("R.utils")
urls <- c(
"http://www.r-project.org/",
"ftp://cran.r-project.org/",
"htttp://www.r-project.org/", ## typo, but still a URL
"", ## empty
NA_character_ ## missing
)
print(urls)
res <- sapply(urls, FUN=isUrl)
print(res)
res <- isUrl(urls)
print(res)
stopifnot(is.logical(res))
stopifnot(length(res) == length(urls))
stopifnot(!any(is.na(res)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.