1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/RcppExports.R
\name{param_get}
\alias{param_get}
\alias{url_parameter}
\title{get the values of a URL's parameters}
\usage{
param_get(urls, parameter_names = NULL)
}
\arguments{
\item{urls}{a vector of URLs}
\item{parameter_names}{a vector of parameter names. If \code{NULL} (default), will extract
all parameters that are present.}
}
\value{
a data.frame containing one column for each provided parameter name. Values that
cannot be found within a particular URL are represented by an NA.
}
\description{
URLs can have parameters, taking the form of \code{name=value}, chained together
with \code{&} symbols. \code{param_get}, when provided with a vector of URLs and a vector
of parameter names, will generate a data.frame consisting of the values of each parameter
for each URL.
}
\examples{
#A very simple example
url <- "https://google.com:80/foo.php?this_parameter=selfreferencing&hiphop=awesome"
parameter_values <- param_get(url, c("this_parameter","hiphop"))
}
\seealso{
\code{\link{url_parse}} for decomposing URLs into their constituent parts and
\code{\link{param_set}} for inserting or modifying key/value pairs within a query string.
}
|