Skip to content

Instantly share code, notes, and snippets.

@abresler
Forked from christophergandrud/get_fed_speeches.R
Created August 3, 2012 17:27
Show Gist options
  • Save abresler/3249791 to your computer and use it in GitHub Desktop.
Save abresler/3249791 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