I have a .mat file I got from someone, and it's supposed to represent global gridded data. I wanted to read it as a raster in R.
Importing was ok, I was able to import using the R.matlab package
> library(R.matlab)
> library(raster)
>
> data <- readMat("map.mat")
> str(data)
List of 1
$ comData: num [1:360, 1:720] NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN ...
- attr(*, "header")=List of 3
..$ description: chr "MATLAB 5.0 MAT-file, Platform: PCWIN64, Created on: Mon May 11 09:17:06 2015 "
..$ version : chr "5"
..$ endian : chr "little"
I would have expected at least three lists, with longitude, latitude, and the data. However, it appears to only have one list comData. I have never imported data from Matlab, I am fairly new with GIS, so probably I am missing something. How can I read this dataset as a raster?