[R] How would you export a 3-dimensional array to an SQL database?
Neuro LeSuperHéros
neuro3000 at hotmail.com
Wed Jul 19 17:23:17 CEST 2006
Here's a way to flatten and unflatten your array.
a <-array(1:24, 2:4)
d <-dim(a)
flattened <-cbind(expand.grid(1:d[1],1:d[2],1:d[3]),as.vector(a))
unflattened <-array(flattened[,4],d)
identical(a,unflattened)
a==unflattened
NeuroRox
>From: "Lapointe, Pierre" <Pierre.Lapointe at nbf.ca>
>To: "'r-help at stat.math.ethz.ch'" <r-help at stat.math.ethz.ch>
>Subject: [R] How would you export a 3-dimensional array to an SQL database?
>Date: Wed, 19 Jul 2006 08:45:42 -0400
>
>Hello,
>
>How would you export a 3-dimensional array to an SQL database?
>
>a<-array(1:24, 2:4)
>
>Is there an open source DB that would be more adequate for this type of
>operation?
>
>Is there a way to reshape/flatten a 3-dimensional array?
>
>Regards,
>
>Pierre Lapointe
>
>**************************************************
>AVIS DE NON-RESPONSABILITE: Ce document transmis par courrie...{{dropped}}
>
>______________________________________________
>R-help at stat.math.ethz.ch 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.
More information about the R-help
mailing list