powered by
Assert that a URL is complete and valid
is_valid_url(string)
(Character) A URL to check.
A logical value, TRUE if the URL is valid, FALSE if otherwise.
TRUE
FALSE
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.
# NOT RUN { is_valid_url("http://rstudio.com") # } # NOT RUN { # }
Run the code above in your browser using DataLab