Rev 86961 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
\name{urltools}\alias{check_package_urls}\alias{parse_URI_reference}\title{Check Package URLs}\description{Check URLs in package sources.}\usage{check_package_urls(dir, verbose = FALSE)parse_URI_reference(x)}\arguments{\item{dir}{a character string specifying the path to a package's rootsource directory.}\item{verbose}{a logical indicating if output should monitor checkprogress.}\item{x}{a character vector of \abbr{URI}s.}}\details{Checking URLs is performed in parallel using \CRANpkg{curl} (so thismust be installed for checking).The URLs checked are extracted from the package \file{DESCRIPTION}(\samp{Description}, \samp{URL} and \samp{BugReports} fields), Rd,\file{CITATION} and \file{NEWS.md} files, if package \CRANpkg{xml2} isinstalled also from the \file{.html} files in \file{inst/doc}, and ifadditionally \command{pandoc} is available on the system the\file{README.md} and \file{NEWS.md} files.For efficiency reasons, URLs are first checked using \samp{HEAD}requests, and the ones with non-OK (200) status codes re-checked via\samp{GET} requests (unfortunately, \samp{HEAD} requests are notalways honored appropriately).\code{parse_URI_reference()} is a helper which splits URI referencesinto its scheme, authority, path, query and fragment parts.See RFC 3986 (\url{https://www.rfc-editor.org/rfc/rfc3986}) for moreinformation.}\value{For \code{check_url_db()}, a data frame inheriting from class\code{check_url_db} with information on the URL check problems found.For \code{parse_URI_reference()}, a data frame with charactervariables \code{scheme}, \code{authority}, \code{path}, \code{query}and \code{fragment}.}\note{This functionality is still experimental: interfaces may change infuture versions.}\examples{## Examples from RFC 3986.parse_URI_reference(c("foo://example.com:8042/over/there?name=ferret#nose","urn:example:animal:ferret:nose","mailto:John.Doe@example.com","tel:+1-816-555-1212"))}\keyword{utilities}