Dear useRs,
Here are three steps for downloading a file from a certain website in R. Here 
you see that in "URL" command (west=68.25&north=24.75&east=68.25&south=24.75) 
are actually the first and second column values of 1st row of a matrix called 
df2 (300 rows and 2 columns). more precisely, df2[1,][1]=68.25, 
df2[1,][2]=24.75. 
Is there a way that I can make a loop so that remaining rows and columns get 
inculcated in the link as such and then get saved at the desired mentioned 
location in 300 different text files?
URL<-("http://disc2.nascom.nasa.gov/daac-bin/Giovanni/tovas/Giovanni_cgi.pl?west=68.25&north=24.75&east=68.25&south=24.75&params=0%7C3B42_V7&plot_type=Time+Plot&byr=1998&bmo=01&bdy=1&eyr=2007&emo=12&edy=31&begin_date=1998%2F01%2F01&end_date=2014%2F01%2F31&cbar=cdyn&cmin=&cmax=&yaxis=ydyn&ymin=&ymax=&yint=&ascres=0.25x0.25&global_cfg=tovas.global.cfg.pl&instance_id=TRMM_V7&prod_id=3B42_daily&action=ASCII+Output";)
destfile <- "C:\\Users\\Eliza\\Desktop\\AA\\love.txt"
download.file(URL, destfile)

Any suggestion?
Thankyou very much in advance,
Eliza                                     
        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to