R/getUrlsCRN.R

getUrlsCRN <- function(url = CRN.DAILY.URL, year = 2011){
  require("RCurl")
  yearUrl <- paste(url,as.character(year),"/",sep = "")
  ftpDir  <- getURL(yearUrl,ftp.use.epsv = FALSE, ftplistonly = TRUE)
  names <- strsplit(ftpDir,split = "\r\n") 
  allurls <- mapply(paste,yearUrl,names,sep = "")
  return(allurls)
}

Try the crn package in your browser

Any scripts or data that you put into this service are public.

crn documentation built on May 1, 2019, 10:11 p.m.