How to connect to a unix server in order to read a text file

Alain Le Page 1 Reputation point

Good evening,

I am new with Microsoft Open R software (windows version) and I would like to know how to connect to a Unix server (server name), username and password,
to either make a listing of the files located in a folder or how to read a text file.

Imagine the server name is Staton and the file is located on : //finsys/folder1/temp/

How do we do that with R?

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
35,111 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Limitless Technology 39,216 Reputation points

    Hi there,

    You can try using the below code to connect to a Unix server with Microsoft R Open.

    <- DBI::dbConnect(odbc::odbc(),
    Driver = "ODBC Driver 17 for SQL Server",
    Server = "XXXX" ,
    Database = "XXXX",
    Trusted_Connection = "yes")

    Hope this resolves your Query !!


    --If the reply is helpful, please Upvote and Accept it as an answer–

    0 comments No comments

  2. Alain Le Page 1 Reputation point

    Could you please try your connection method on a Unix Server. I don't think that will work.

    When you connect on a Unix Server, we need the server name or its ip address, my username and password. Without that it won't be possible to connect

    In your example, <-<- DBI::dbConnect(odbc::odbc(), R does not like it.

    Also, when your are connected to a Unix server, the only other information you need is the folder name ex: //finance/temp1/filename

    If you could find me an example how to connect to a Unix Server using Microsoft R Open