Re: [R] Help to download data from multiple URLs with API key

2020-04-22 Thread Bhaskar Mitra
Hi Eric, Thanks for your help. This is really helpful. I have also adjusted the code to ensure filename has the base url and suffix as strings. thanks, bhaskar On Tue, Apr 21, 2020 at 12:16 AM Eric Berger wrote: > Hi Bhaskar, > Why not just create a function that does the repetitive work, suc

Re: [R] Help to download data from multiple URLs with API key

2020-04-21 Thread Eric Berger
Hi Bhaskar, Why not just create a function that does the repetitive work, such as doOne <- function( suffix ) { base_url <- "abcd" # This remains constant b <- "api_key"# the api key - this remains constant c <- paste("series_id=",suffix,sep="") full_url = paste0(

[R] Help to download data from multiple URLs with API key

2020-04-20 Thread Bhaskar Mitra
Hello Everyone, I am trying to download data from multiple websites using API key. The code to download from one URL is given below. I have a list of multiple URLs' where the suffix URL 'c' keeps changing. I would appreciate any help on how i can modify the code below that will allow me to rea