Dear all, I am trying to import data with read.csv and my file is on remote machine. I believe that I need to open a connection, not sure about syntax though. I would appreciate any suggestions, Thanks! Olga
Hi, On Aug 4, 2009, at 10:37 AM, Olga Lyashevska wrote:> Dear all, > > I am trying to import data with read.csv and my file is on remote > machine. > I believe that I need to open a connection, not sure about syntax > though. > > I would appreciate any suggestions,Look at the different ways you can open file connections in the ? connections help page. If the file is accessible via http, or ftp I guess you're in luck, otherwise I'd imagine you have to just copy the file to your local system then open it. -steve -- Steve Lianoglou Graduate Student: Computational Systems Biology | Memorial Sloan-Kettering Cancer Center | Weill Medical College of Cornell University Contact Info: http://cbio.mskcc.org/~lianos/contact
On Tue, Aug 4, 2009 at 3:37 PM, Olga Lyashevska<olga at herenstraat.nl> wrote:> Dear all, > > I am trying to import data with read.csv and my file is on remote machine. > I believe that I need to open a connection, not sure about syntax though.If it's on an HTTP server then you don't need to faff with connections, just give the URL to read.csv: > data = read.csv("http://foo.example.com/file.csv") Probably works with ftp: too. How remote is it? Barry
Thanks Barry and Steve,>> I am trying to import data with read.csv and my file is on remote >> machine. >> I believe that I need to open a connection, not sure about syntax >> though. > Probably works with ftp: too. How remote is it?In fact it is a bit more complicated. I am working on a Mac machine, from this machine I establish ssh with a Linux machine. I run R on Linux, while all my data files are stored on Mac. So in this case although physically I am using Mac, it is in fact remote. I hope it answers your question. Thanks again, Olga