[R] Problem reading from a file

David Winsemius dwinsemius at comcast.net
Thu Jun 18 16:14:25 CEST 2009


1) What is the rest of your code ... e.g. that part which sets up the  
file names and at least the parameters and file access parts of the  
function cluster_compare?

> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.


2) Just a guess in the absence of code.  Does this work:
> cluster_compare( myfile <- file.choose(), mclfile <- file.choose() )


-- 
David

On Jun 18, 2009, at 7:03 AM, Nick Angelou wrote:

>
> Hi all,
>
> I have written a function
>
> cluster_compare(myfile, mclfile)
>
> I called it giving names of files in the working directory (I see  
> them with
> dir()). I get
>
> Error in file("myfile", "r") : cannot open the connection
> In addition: Warning message:
> In file("myfile", "r") :
>  cannot open file 'myfile': No such file or directory
>
> I tried even calling the function like that:
>
> myfile <- file.choose()
> mclfile <- file.choose()
> cluster_compare(myfile, mclfile)
>
> where I interactively select the files. Yet, I get the same error  
> again.
> It's quite puzzling. Any advice? (fyi - I'm on Vista)
>
> regards,
>
> Nick
>
> -- 
> View this message in context: http://www.nabble.com/Problem-reading-from-a-file-tp24090764p24090764.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help at r-project.org 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 Winsemius, MD
Heritage Laboratories
West Hartford, CT




More information about the R-help mailing list