An embedded and charset-unspecified text was scrubbed... Name: not available Url: https://stat.ethz.ch/pipermail/r-help/attachments/20040119/ed5bb491/attachment.pl
Relative risk using GAM
4 messages · Gomez J. Edison, Giampiero Salvi, Brian Ripley
1 day later
Hi,
I wonder if it is possible to read data on another computer (unix like system)
using ssh (I mean any of ssh, scp, sftp). I saw that R has no problem reading
files across the net (for example read.table(url("http://www...")) ), but what
if the file is on a local disk of another machine? For security reasons we are
not allowed to have the normal ftp (and telnet) running.
I played a bit with url(file://), but I don't know how (if it's possible) to
specify both the address of the computer and the file name. I tried like this
url("file://host_name/path/filename") and url("file://host_name:/path/filename")
but it didn't work.
I want to do this because my data files are big (500Mb) and I don'r want to have
copies on every computer I use.
Thank you!
Giampiero
I solved my problem this way (if somebody is interested):
pipe("ssh hostname 'cat path/filename'"))
I guess I could even use gzip instead of cat or the ssh option -C to compress
the data that has to be transferred.
R rocks!
Giampiero
On Wed, 21 Jan 2004, Giampiero Salvi wrote:
Hi,
I wonder if it is possible to read data on another computer (unix like system)
using ssh (I mean any of ssh, scp, sftp). I saw that R has no problem reading
files across the net (for example read.table(url("http://www...")) ), but what
if the file is on a local disk of another machine? For security reasons we are
not allowed to have the normal ftp (and telnet) running.
I played a bit with url(file://), but I don't know how (if it's possible) to
specify both the address of the computer and the file name. I tried like this
url("file://host_name/path/filename") and url("file://host_name:/path/filename")
but it didn't work.
I want to do this because my data files are big (500Mb) and I don'r want to have
copies on every computer I use.
Thank you!
Giampiero
______________________________________________ R-help at stat.math.ethz.ch mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
On Wed, 21 Jan 2004, Giampiero Salvi wrote:
Hi,
I wonder if it is possible to read data on another computer (unix like system)
using ssh (I mean any of ssh, scp, sftp). I saw that R has no problem reading
files across the net (for example read.table(url("http://www...")) ), but what
if the file is on a local disk of another machine? For security reasons we are
not allowed to have the normal ftp (and telnet) running.
I played a bit with url(file://), but I don't know how (if it's possible) to
specify both the address of the computer and the file name. I tried like this
url("file://host_name/path/filename") and url("file://host_name:/path/filename")
but it didn't work.
It is not part of the file:// schema. On some OSes you can transparently access exported files on other machines, in which case you don't need to use url(), as file() will do. (Windows NT is one.)
I want to do this because my data files are big (500Mb) and I don'r want to have copies on every computer I use.
R has no built-in ssh support. Nor could it given the diverse variants of
ssh that are running (and the unfortunate tendency of OpenSSH
installations to refer to themselves as ssh2, yet be incompatible with
ssh2 as originally released by the company SSH).
You could use something like pipe("ssh myserver cat myfile"), or you could
make a copy to a temporary area and read that (which would be better for
read.table as that needs to re-read parts of the file).
Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595