Dear Atul,
See
http://www.stat.ucl.ac.be/ISdidactique/Rhelp/library/R.matlab/html/readMAT.html

I think that the function is readMAT rather than readMat.

HTH,

Jorge


On Sat, Oct 18, 2008 at 1:35 PM, Atul Kulkarni <atulskulkarni@gmail.com>wrote:

> Hi All,
>
> I installed this R.matlab package and tried using the sample code
>
> >
>
> > path <- system.file("mat-files", package="R.matlab")
>
> >
>
> > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
>
> > # Reading all example files
>
> > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
>
> > for (version in 4:5) {
> +   cat("Loading all MAT v", version, " example files in ",
> +                                                 path, "...\n", sep="")
> +
> +   pattern <- sprintf("-v%d.mat$", version)
> +   filenames <- list.files(pattern=pattern, path=path, full.names=TRUE)
> +
> +   for (filename in filenames) {
> +     cat("Reading MAT file: ", basename(filename), "\n", sep="")
> +     mat <- readMat(filename)
> +     if (interactive()) {
> +       cat("Press ENTER to view data:")
> +       readline()
> +     }
> +     print(mat)
> +   }
> + }
>
> it gives the following output.
>
> Loading all MAT v4 example files in
> /home/atul/R/x86_64-pc-linux-gnu-library/2.6/R.matlab/mat-files...
> Reading MAT file: Matrix-BigEndian-v4.mat
> Error: could not find function "readMat"
>
> Did i do something wrong? Please advise.
>
> Regards,
> Atul.
>
>        [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help@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.
>

	[[alternative HTML version deleted]]

