On 28-08-2012, at 16:57, TwistedSkies wrote: > Hello, > > I am receiving a 'Permission Denied' error when trying to use the R Download > funtion. > > I am wondering if this is a: > > - Error in the code > - Permissions issue at source > - Permissions issue at destination. > > If you could shed any light on this it would be very much appreciated, below > is a sample of the code. > > > Code > > download.file("http://www.nhc.noaa.gov/storm_graphics/api/AL092012_029adv_CONE.kmz", > "C:\\Users\\jones\\Desktop") > print("Downloaded File") > > Error > > Error in > download.file("http://www.nhc.noaa.gov/storm_graphics/api/AL092012_029adv_CONE.kmz", > > : > cannot open destfile C:\\Users\\jones\\Desktop, reason 'Permission denied' >
If you read the description of the destfile argument of download.file destfile A character string with the name where the downloaded file is saved. Tilde-expansion is performed. the error in your code is that you specified a directory as destination. It must be a file: ""C:\\Users\\jones\\Desktop\\downloadedfile.kmz". For the record: PLEASE do read the posting guide http://www.R-project.org/posting-guide.html Berend ______________________________________________ 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.