An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20101016/987f8348/attachment.pl>
Convert array to list
2 messages · kapo coulibaly, Edzer Pebesma
a = array(1:27, c(3,3,3)) a unlist(lapply(apply(a,1,function(x) apply(x,1,list)), function(x) unlist(x, recursive = FALSE)), recursive = FALSE)
On 10/16/2010 11:15 PM, kapo coulibaly wrote:
Is there a quick way to convert a 3 dimensional array to a list of vectors of the third dimension. ex: array[a,b,c] to a list containing array[1,1,], array[1,2,], array[1,3].........array[1,b], array[2,1,] ......array[a,b,c] preferably avoiding l;oops. Thanks [[alternative HTML version deleted]]
_______________________________________________ R-sig-Geo mailing list R-sig-Geo at stat.math.ethz.ch https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Edzer Pebesma Institute for Geoinformatics (ifgi), University of M?nster Weseler Stra?e 253, 48151 M?nster, Germany. Phone: +49 251 8333081, Fax: +49 251 8339763 http://ifgi.uni-muenster.de http://www.52north.org/geostatistics e.pebesma at wwu.de