Grokbase Groups R r-help August 2012
FAQ
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'




--
View this message in context: http://r.789695.n4.nabble.com/R-Download-Permission-Denied-tp4641568.html
Sent from the R help mailing list archive at Nabble.com.

Search Discussions

  • Berend Hasselman at Aug 28, 2012 at 3:24 pm

    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
  • TwistedSkies at Aug 28, 2012 at 3:38 pm
    Ahhh that makes sense now.

    I figured that the name would be that of the file you were downloading.

    Feel a bit stupid now, many thanks!





    --
    View this message in context: http://r.789695.n4.nabble.com/R-Download-Permission-Denied-tp4641568p4641582.html
    Sent from the R help mailing list archive at Nabble.com.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupr-help @
categoriesr
postedAug 28, '12 at 2:57p
activeAug 28, '12 at 3:38p
posts3
users2
websiter-project.org
irc#r

2 users in discussion

TwistedSkies: 2 posts Berend Hasselman: 1 post

People

Translate

site design / logo © 2022 Grokbase