Most likely the file lahore.txt isn't in the current working directory, which is where R will be looking for it as you don't specify a path (I'm assuming that you are working in Windows). If so, you have three options. 1) Move lahore.txt to the current working directory (you can find with directory that is using the function getwd()). 2) Specify the full path in read.delim (e.g., read.delim("c:/my documents/data/lahore.txt"). 3) Change the working directory to the one in which lahore.txt is located using the function setwd().
Hope this helps. David On 30/10/06, amna khan <[EMAIL PROTECTED]> 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: > [EMAIL PROTECTED] > [EMAIL PROTECTED] > [EMAIL PROTECTED] > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help@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. > -- ================================= David Barron Said Business School University of Oxford Park End Street Oxford OX1 1HP ______________________________________________ R-help@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.