i am now having a single date vector A (362 rows) and i have a 3D matrix B (dimensions 360*180*3620)
> str(ssta_date)
POSIXlt[1:362], format: "1981-11-15" "1981-12-15" "1982-01-15" "1982-02-15" "1982-03-15" ...
> dim(ssta_sst)
[1] 360 180 362
is it possible to combine A and B as a data frame or something else. it must match each date and each temperature in the B [,,362]. so each date will corresponding to a 360*180 matrix.
Because i am planning to do this t to select certain month data, is there any shortcut to do month data selection without combine the two data sets?
If I understand what you want,
you can use
meltto convert your array to a data.frame,and then use
mergeto join it with the other piece of data.If you want an array at the end, you can use
acastto convert the data.frame back to an array.