Skip to content

Instantly share code, notes, and snippets.

@christophergandrud
Created December 26, 2011 07:11
Show Gist options
  • Save christophergandrud/1520681 to your computer and use it in GitHub Desktop.
Save christophergandrud/1520681 to your computer and use it in GitHub Desktop.
Gather Fed Speeches
## Download websites
addresses <- read.csv("~/links.full.csv")
for (i in addresses){
fed.text <- getURL(i)
}
fed.df <- as.data.frame(fed.text)
## Save raw HTML to individual text files
outpathA <- "~/fed.text.indv.full/"
x <- 1:nrow(fed.df)
for(i in x) {
write(as.character(fed.df[i,1]), file = paste(outpathA,"/",i,".txt",sep = ""))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment