r - how to combine a list of csv values from a getURLcontent download? -
i want extract data list of uris (48 in total) using geturlcontent.
i can access, read , convert them using read.csv , textconnection, i'm having troubles in combining of them in single data.frame using single function.
as now, last download (last uri) correctly saved in env (temp_dados), not being able combine 48 ones in 1 vector (dados_totais_mg). i'm using for below :
dados_totais_mg <- null # create empty data.frame fun <- (k in 1:length(urllist)) { temp = geturlcontent(urllist[k], curl = mycurl) temp_dados = read.csv(textconnection(temp), header = false, na.strings = ".", sep = ";", skip = 47, comment.char = "<")[ ,1:10] dados_totais_mg[k] = do.call(rbind, temp_dados) } any appreciated !
Comments
Post a Comment