Gregor Gorjanc a écrit :
If I summarize the thread there is (currently) no way to test for
internet presence with a general approach.
what about try(readLines(...)) ?
(at least it works fine on Windows.)
__
R-help@stat.math.ethz.ch mailing list
On 11-Sep-06 Gregor Gorjanc wrote:
Thank you. Your solution is usable but unfortunatelly not portable to
Windows. I would like to use this test in package check, which can
include also windows OS.
Now that I think about it (should have done that earlier),
you can use the value of
Prof Brian Ripley ripley at stats.ox.ac.uk writes:
...
Check out tests/internet.R. nsl() checks if you can resolve host names,
which has worked well enough there.
Thank you prof. Ripley for this pointer. I am posting here the relevant part if
someone does not look at SVN. I would just like to
Gabor Grothendieck wrote:
Here is a variation for Windows. The second line returns TRUE or FALSE
and may need to be varied if the output of ping is not the same on your
system as on mine:
ping - system(ping www.google.com, intern = TRUE)
as.numeric(strsplit(grep(Received, ping, value =
On Mon, 11 Sep 2006, Gregor Gorjanc wrote:
Prof Brian Ripley ripley at stats.ox.ac.uk writes:
...
Check out tests/internet.R. nsl() checks if you can resolve host names,
which has worked well enough there.
Thank you prof. Ripley for this pointer. I am posting here the relevant part
Prof Brian Ripley wrote:
On Mon, 11 Sep 2006, Gregor Gorjanc wrote:
Prof Brian Ripley ripley at stats.ox.ac.uk writes:
...
Check out tests/internet.R. nsl() checks if you can resolve host names,
which has worked well enough there.
Thank you prof. Ripley for this pointer. I am posting here
Hello useRs!
I have a small package and I need internet access for examples. Of
course it works fine when I have internet access, but not otherwise. I
remember I saw a way to test availability of internet access, but I can
not find it now in archives. Can anyone here help me?
Thanks!
--
Lep
David Barron wrote:
I means non-zero, not non-negative.
...
Thanks. download.file() is fine!
--
Lep pozdrav / With regards,
Gregor Gorjanc
--
University of Ljubljana PhD student
Biotechnical Faculty
Zootechnical
The function download.file (invisibly) returns a non-negative integer
if it fails, so I suppose you could use this as a test.
On 11/09/06, Gregor Gorjanc [EMAIL PROTECTED] wrote:
Hello useRs!
I have a small package and I need internet access for examples. Of
course it works fine when I have
I means non-zero, not non-negative.
On 11/09/06, David Barron [EMAIL PROTECTED] wrote:
The function download.file (invisibly) returns a non-negative integer
if it fails, so I suppose you could use this as a test.
On 11/09/06, Gregor Gorjanc [EMAIL PROTECTED] wrote:
Hello useRs!
I have a
Gregor Gorjanc wrote:
Hello useRs!
I have a small package and I need internet access for examples. Of
course it works fine when I have internet access, but not otherwise. I
remember I saw a way to test availability of internet access, but I can
not find it now in archives. Can anyone here
Gregor Gorjanc wrote:
Gregor Gorjanc wrote:
Hello useRs!
I have a small package and I need internet access for examples. Of
course it works fine when I have internet access, but not otherwise. I
remember I saw a way to test availability of internet access, but I can
not find it now in
On 11-Sep-06 Gregor Gorjanc wrote:
It seems that 'internal' method was used (I use R 2.3.1 under
Linux) as indicated in help page of download.file. I could
use wget or lynx methods, but these two must be available,
so this is not really portable. Are there any other options
for testing
On Mon, 11 Sep 2006, [EMAIL PROTECTED] wrote:
On 11-Sep-06 Gregor Gorjanc wrote:
It seems that 'internal' method was used (I use R 2.3.1 under
Linux) as indicated in help page of download.file. I could
use wget or lynx methods, but these two must be available,
so this is not really
[Sorry -- errors due to mistyping especially at below.
Corrected in the following lines.]
On 11-Sep-06 Ted Harding wrote:
On 11-Sep-06 Gregor Gorjanc wrote:
It seems that 'internal' method was used (I use R 2.3.1 under
Linux) as indicated in help page of download.file. I could
use wget or
Thank you. Your solution is usable but unfortunatelly not portable to
Windows. I would like to use this test in package check, which can
include also windows OS.
On 11-Sep-06 Ted Harding wrote:
On 11-Sep-06 Gregor Gorjanc wrote:
It seems that 'internal' method was used (I use R 2.3.1 under
Here is a variation for Windows. The second line returns TRUE or FALSE
and may need to be varied if the output of ping is not the same on your
system as on mine:
ping - system(ping www.google.com, intern = TRUE)
as.numeric(strsplit(grep(Received, ping, value = TRUE), [ ,])[[1]][8]) 0
On
17 matches
Mail list logo