urls <- c("http://R.url.handlers/", "http://are.scalar.what") URLdecode(urls) [1] "http://R.url.handlers/" Warning message: In charToRaw(URL) : argument should be a character vector of length 1 all but the first element will be ignored
urls <- "http://fine.scalar.sigh.whatever/" URLencode(urls, reserved = TRUE)
urls <- "http://what.about.decoding/test%gIL" URLdecode(urls) Error in rawToChar(out) : embedded nul in string: 'http://what.about.decoding/test\0L' In addition: Warning message: In URLdecode(urls) : out-of-range values treated as 0 in coercion to raw
library(urltools) url <- "http://does%20this%20work/%gIL" url_decode(url) url <- "http://awesome what about this/" url_encode(url) urls <- c("http://thats%20really%20cool/", "http://look%20at%20it%20go/") url_decode(urls)
library(magrittr) url <- "http://user2015.math.aau.dk/invited_talks#francois" str(url_parse(url)) url_parse(url) %>% url_compose
url <- "http://everythingiknowilearnedfromlubridate.org/page" scheme(url) domain(url) scheme(url) <- "https" domain(url) <- "isbetter.org" url
url <- "http://thisisaurl/withapath/?action=query&date=20150530&authorised=true" str(url_parameters(url, c("date", "authorised")))
install.packages("urltools")
http://github.com/Ironholds/urltools
http://ironholds.org
Questions?
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.