read .mat file in R
1
0
Entering edit mode
s.kazemi.n • 0
@skazemin-6836
Last seen 9.5 years ago
United States

I have my data as .mat file (from Matlab), and I want to process it with 'MassSpecWavelet' package to find its peaks.

I tested this code,

> path <- system.file("mat-files", package="R.matlab")
> pathname <- file.path("d:", "Prony Paper")
> data <- readMat(pathname)

and I get this reply from R;

Error in file(con, open = "rb") : cannot open the connection
In addition: Warning message:
In file(con, open = "rb") :
  cannot open file 'd:/Prony Paper': Permission denied

can anyone say me how to load .mat file?

Thank you very much

 

 

process • 5.8k views
ADD COMMENT
1
Entering edit mode

Possibly the file path is specified incorrectly, requiring a '.mat' extension file.path("d:", "Prony Paper.mat") if that is in fact the path to the file that you're trying to read in. Also there are several 'readMat()' functions out there, so it's important to provide information on the specific function you are trying to use.

ADD REPLY
0
Entering edit mode
@peter-langfelder-4469
Last seen 23 days ago
United States

It sounds more like you do not have permission to read the file or the directory? Check the permissions on the directory d:\

ADD COMMENT

Login before adding your answer.

Traffic: 837 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6