R/create_root_url.R

Defines functions create_root_url

Documented in create_root_url

#' @title
#' Creates a root URL form an inputted URL
#' @description
#' Creates the root URL of a given URL. Function can only take a object of length 1 in order to work
#' @param input.URL Specified URL string
#' @return Root of inputted URL
#' @export

create_root_url <- function(input.URL){

  root_URL <- paste0("http://", httr::parse_url(input.URL)$hostname)

  return( root_URL )
}
Nonprofit-Open-Data-Collective/webscraper documentation built on July 19, 2023, 6:09 p.m.