Hello all, This is Meghana. Well, I have some analysis output in 3 dimensional array form. for example: , , type1 A B C D 1 2 3 4 1 2 3 4 , , type2 etc. This array is very big. and I want to export this to either text form or excel(csv is preffered) so that different parts of aaray should be easily extractable from that excel/text sheet. How can I go about it? Thank you, Meghana [[alternative HTML version deleted]]
?WriteXLS On Mon, Mar 29, 2010 at 6:29 AM, meghana kulkarni <msk2511 at gmail.com> wrote:> Hello all, > This is Meghana. > > Well, I have some analysis output in 3 dimensional array form. > for example: > > , , type1 > > ? ? ?A B C D > ? ? ?1 2 3 ?4 > ? ? ?1 2 3 4 > > ?, , type2 > > etc. > > This array is very big. and I want to export this to either text form or > excel(csv is preffered) so that different parts of aaray should be easily > extractable from that excel/text sheet. > > How can I go about it? > > Thank you, > Meghana > > ? ? ? ?[[alternative HTML version deleted]] > > ______________________________________________ > R-help at 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. >
Hi, I've never worked with 3d arrays so I'm not sure what to do. Have you tried write.csv()? The function write.xls() from package xlsReadWrite can be really useful too, as well as RODBC which allow appending new spreadsheets to an existing Excel file (works on Windows). Without more on your data, I cannot really help you, but maybe someone can. HTH, Ivan Le 3/29/2010 15:29, meghana kulkarni a ?crit :> Hello all, > This is Meghana. > > Well, I have some analysis output in 3 dimensional array form. > for example: > > , , type1 > > A B C D > 1 2 3 4 > 1 2 3 4 > > , , type2 > > etc. > > This array is very big. and I want to export this to either text form or > excel(csv is preffered) so that different parts of aaray should be easily > extractable from that excel/text sheet. > > How can I go about it? > > Thank you, > Meghana > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at 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. > >-- Ivan CALANDRA PhD Student University of Hamburg Biozentrum Grindel und Zoologisches Museum Abt. S?ugetiere Martin-Luther-King-Platz 3 D-20146 Hamburg, GERMANY +49(0)40 42838 6231 ivan.calandra at uni-hamburg.de ********** http://www.for771.uni-bonn.de http://webapp5.rrz.uni-hamburg.de/mammals/eng/mitarbeiter.php
On Mar 29, 2010, at 9:29 AM, meghana kulkarni wrote:> Hello all, > This is Meghana. > > Well, I have some analysis output in 3 dimensional array form. > for example: > > , , type1 > > A B C D > 1 2 3 4 > 1 2 3 4 > > , , type2?write.table > arr <- array(1:27, c(3,3,3)) > write.table(arr[, , 1]) "V1" "V2" "V3" "1" 1 4 7 "2" 2 5 8 "3" 3 6 9 > for(i in 1:3) write.table(arr[, , i], sep=", ") "V1", "V2", "V3" "1", 1, 4, 7 "2", 2, 5, 8 "3", 3, 6, 9 "V1", "V2", "V3" "1", 10, 13, 16 "2", 11, 14, 17 "3", 12, 15, 18 "V1", "V2", "V3" "1", 19, 22, 25 "2", 20, 23, 26 "3", 21, 24, 27 See the help page for further options about quotes, separators and col.names.> > etc. > > This array is very big. and I want to export this to either text > form or > excel(csv is preffered) so that different parts of aaray should be > easily > extractable from that excel/text sheet. > > How can I go about it? > > Thank you, > Meghana > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at 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.David Winsemius, MD West Hartford, CT