I have a multidimensional array - in this case with 4 dimensions of x,y,z and time. I'd like to take the time derivative of this matrix, i.e. perform the diff operator along dimension number 4.
In Matlab, there is a simple option to specify which dimension the difference is to be taken across., but I can't see this in R. I realise I can use aperm to rotate my array so that time is in the 1st dimension, then do the difference, but this seems a little messy. Surely I can't be the first person wanting to do this, but I can't find any answers after doing a (what I thought was thorough) search. Thanks in advance, Phil. [[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.