[R] for importing "data"

Gabor Grothendieck ggrothendieck at gmail.com
Mon Oct 30 09:55:17 CET 2006


Move to the appropriate directory first (or else move your
file to where you are now).  For example,
1. if the file is in \ then

   setwd("/")

2. or

   getwd()

which shows where you are now and then you can move your
file to that spot.

3. Another possibility is:

   read.delim(file.choose())

which will bring up a file explorer window so you can traverse the file
system to find it.

On 10/30/06, amna khan <amnakhan493 at gmail.com> wrote:
> *I am a very new user of R. I've spent several hours trying to import
> data, so I feel okay asking the list for help. *
> *I had an Excel file,  then I turned it into a "tab-delimited" file, as
> instructed by directions My
> filename is "lahore.txt" I amusing the following commands for read.delim but
> i am getting following mesages. Sir i am sending you my excel data file i
> request you to   please write the right read.delim function for  importing
> data file after transforming it into a tab-delimited form.*
>
> lahore<-read.delim("lahore.txt")
> Error in file(file, "r") : unable to open connection
> In addition: Warning message:
> cannot open file 'lahore.txt', reason 'No such file or directory'
>
> Regards
>
> AMINA SHAHZADI*.*
> Department of Statistics
> GC University Lahore, Pakistan.
> Email:
> amnakhan493 at gmail.com
> amna_989 at hotmail.com
> amna_989 at yahoo.com
>
>        [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>



More information about the R-help mailing list