[R] Problem downloading webpages using batchfiles and RCurl from command line in Vista Basic - couldn't connect to host

Gabor Grothendieck ggrothendieck at gmail.com
Wed Jun 3 03:34:51 CEST 2009


On Tue, Jun 2, 2009 at 12:42 PM, Tony Breyal <tony.breyal at googlemail.com> wrote:
> Hi Gabor,
>
> Thank you kindly for your response.
>
> Re: Don't need to set PATH -- When I read the batchfiles page, the
> opening paragraph says "just place any or all of them anywhere in your
> Windows path and you will be able to access them in any Windows
> console session". My interpretation of this was that I am suppose to
> alter the PATH variable, so that if i create a new batchfile of my
> own, then instead of having to write
>
> "C:\...\R-2.8.1\bin\R.exe" CMD BATCH --vanilla --slave "C:\...
> \myRScript.R"
>
> I would instead write:
>
> RCMD BATCH --vanilla --slave "C:\...\myRScript.R"
>
> which would refer to the latest version of R, and is therefore a very
> nice short hand i think? Other than that, I must admit that I'm not
> exactly sure what batchfiles is for, but i have seen it spoken of
> quite a bit on this forum and therefore figured that it is the best
> way to handle batch jobs. When i look at the webpage, it says that
> "[batch]files useful in conjuction with R and R packages on Microsoft
> Windows" but not why it's useful, if you see what i mean? The README
> has a good first line though "batchfiles contains batch and GUI files
> for installing and maintaing R." which is not stated on the webpage
> but would be nice if it was.  :-)

Yes, the main reason to use Rcmd.bat is that you don't have to set your
PATH environment variable.  Getting the PATH wrong is one of the key
things that people get wrong so not having to set it reduces the possible
set of installation errors.  Also it means that when you upgrade R you
don't have to
reset it so you are saved the headache on a continuing basis.
You only have to place Rcmd.bat on your existing path and it will look
into the registry to find R and then run it.  You don't have to change
your PATH variable.

I was just referring to Rcmd.bat but there are other utilities in the
batchfiles
collection as well which have various uses.  See list here:
http://batchfiles.googlecode.com/#PROGRAM_LIST

>
> Re: Elevated mode -- I did as you advised but unfortunately i ended up
> with the same couldn't connect to host error.
>
> Re: running without batchfiles -- I did as you advised and got this as
> the path "C:\\PROGRA~1\\R\\R-29~1.0/bin/Rscript.exe" but unfortunately
> i ended up with the same couldn't connect to host error.
>
> As this batch process has worked before in Vista Ulitmate, is it
> possible that Vista Basic is different enough to stop R batch jobs
> from connecting to the internet?

Its possible.  I don't have Vista Basic myself.
If you are only looking to download files you might
also try the download.file(...) R command and try different values of
method= if need be.

Another thing to look into is if you have a firewall blocking it.
That would be related more to the particular configuration than
Vista Basic itself.

Try grabbing wget.exe and running it from outside of R to get a file
to see if that works.  That might help determine if you have a problem
even without R.




More information about the R-help mailing list