Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- downloadxlsx<-function(url,sheet){
- library(gdata)
- tmp = tempfile(fileext = ".xlsx")
- download.file(url = url, destfile = tmp, mode="wb")
- #toc<-read.xls(tmp,sheet=1)
- read.xls(tmp,sheet=sheet)
- }
- temp<-data.frame(downloadxlsx("https://www.bls.gov/web/empsit/compaeu.xlsx",sheet=1),stringsAsFactors = F)
- colnames(temp)<-temp[2,]
- temp<-temp[3:12,]
- View(temp)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement