On Wed, 14 Mar 2007 18:45:53 -0700 (PDT) Milton Cezar Ribeiro <[EMAIL
PROTECTED]> wrote:
> Dear Friends,
>
> I saved a matrix - which contans values 0 and 1 - using following command:
> writeBin (as.integer(mymatrix), "myfile.raw", size=1).
>
> It is working fine and I can see the matrix using photoshop. But now I need
> read the matrices again (in fact I have a thousand of them) as matrix into R
> but when
> I try something like mat.dat<-readBin ("myfile.raw",size=1) I can“t access
> the
> matrix
>
> Kind regards,
>
> Miltinho
>
> __________________________________________________
>
>
> [[alternative HTML version deleted]]
>
Look up the help file. There is an explicit example. Basically, you need to
tell the file to read in binary.
In fact, I am a little surprised your first command works while writing.
HTH!
Ranjan
______________________________________________
[email protected] 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.