Awesome Open Source
Awesome Open Source

Project Status: Active – The project has reached a stable, usable state and is being actively developed. Signed by Signed commit % Linux build Status Coverage Status cran checks CRAN status Minimal R Version License


Expand Short ‘URLs’


Tools are provided to expand vectors of short URLs into long ‘URLs’. No ‘API’ services are used, which may mean that this operates more slowly than ‘API’ services do (since they usually cache results of expansions that every user of the service requests). You can setup your own caching layer with the ‘memoise’ package if you wish to have a speedup during single sessions or add larger dependencies, such as ‘Redis’, to gain a longer-term performance boost at the expense of added complexity.

What’s Inside The Tin

The following functions are implemented:

  • expand_urls: Expand a vector of (short) URLs using


install.packages("longurl", repos = c("", ""))
# or
# or
# or
# or

NOTE: To use the ‘remotes’ install options you will need to have the {remotes} package installed.



# current version
## [1] '0.3.3'
  "qrp://not a valid url/"
) -> test_urls

expand_urls(test_urls) %>% 
  dplyr::select(orig_url, status_code, expanded_url) %>% 
orig_url status_code expanded_url 200 404 200 200 200 404
qrp://not a valid url/ NA NA

longurl Metrics

Lang # Files (%) LoC (%) Blank lines (%) # Lines (%)
R 4 0.8 110 0.84 20 0.54 51 0.65
Rmd 1 0.2 21 0.16 17 0.46 27 0.35

Code of Conduct

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.

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
r (2,410
rstats (313
url (95
url-shortener (41