is_valid_url {librarian} | R Documentation |
Assert that a URL is complete and valid
Description
Assert that a URL is complete and valid
Usage
is_valid_url(string)
Arguments
string |
(Character) A URL to check. |
Details
The regex I use is "@stephenhay" from https://mathiasbynens.be/demo/url-regex because it's the shortest regex that matches every CRAN mirror at https://cran.r-project.org/mirrors.html.
Value
A logical value, TRUE
if the URL is valid, FALSE
if otherwise.
Examples
## Not run:
is_valid_url("http://rstudio.com")
## End(Not run)
[Package librarian version 1.8.1 Index]