Learn R Programming

⚠️There's a newer version (1.7.3) of this package.Take me there.

urltools

A package for elegantly handling and parsing URLs from within R.

Author: Oliver Keyes, Jay Jacobs License: MIT Status: Stable

Description

URLs in R are often treated as nothing more than part of data retrieval - they're used for making connections and reading data. With web analytics and research, however, URLs can be the data, and R's default handlers are not best suited to handle vectorised operations over large datasets. urltools is intended to solve this.

It contains drop-in replacements for R's URLdecode and URLencode functions, along with new functionality such as a URL parser and parameter value extractor. In all cases, the functions are designed to be content-safe (not breaking on unexpected values) and fully vectorised, resulting in a dramatic speed improvement over existing implementations - crucial for large datasets. For more information, see the urltools vignette.

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

Installation

The latest CRAN version can be obtained via:

install.packages("urltools")

To get the development version:

devtools::install_github("ironholds/urltools")

Dependencies

Copy Link

Version

Install

install.packages('urltools')

Monthly Downloads

40,094

Version

1.7.0

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Oliver Keyes

Last Published

January 20th, 2018

Functions in urltools (1.7.0)

param_remove

Remove key-value pairs from query strings
param_set

Set the value associated with a parameter in a URL's query.
host_extract

Extract hosts
param_get

get the values of a URL's parameters
parameters

Get or set a URL's parameters
path

Get or set a URL's path
url_decode

Encode or decode a URI
fragment

Get or set a URL's fragment
strip_credentials

Get or remove user authentication credentials
domain

Get or set a URL's domain
scheme

Get or set a URL's scheme
suffix_dataset

Dataset of public suffixes
tld_refresh

Retrieve a TLD dataset
url_compose

Recompose Parsed URLs
tld_dataset

Dataset of top-level domains (TLDs)
tld_extract

Extract TLDs
suffix_extract

extract the suffix from domain names
suffix_refresh

Retrieve a public suffix dataset
url_parse

split URLs into their component parts
urltools

Tools for handling URLs
port

Get or set a URL's port
puny_encode

Encode or Decode Internationalised Domains