RE: [R] Change the result data

2005-05-11 Thread bogdan romocea
(hec.data)) your.dfr - data.frame(eye=rep(dfr$eye,dfr$Freq),hair=rep(dfr$hair,dfr$Freq)) -Original Message- From: Muhammad Subianto [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 10, 2005 8:38 AM To: r-help@stat.math.ethz.ch Subject: [R] Change the result data Dear R-helper, I have a data like

[R] Change the result data

2005-05-10 Thread Muhammad Subianto
Dear R-helper, I have a data like: hec.data -array(c(5,15,20,68,29,54,84,119,14,14,17,26,16,10,94,7), dim=c(4,4), dimnames=list(eye=c(Green,Hazel, Blue, Brown), hair=c(Black, Brown, Red, Blond))) as.data.frame(as.table(hec.data))

[R] Change the result data

2004-02-27 Thread Muhammad Subianto
Dear R-helper, I have a data like: hec.data -array(c(5,15,20,68,29,54,84,119,14,14,17,26,16,10,94,7), +dim=c(4,4), +dimnames=list(eye=c(Green,Hazel, Blue, Brown), +hair=c(Black, Brown, Red, Blond))) hec.data hair eye Black Brown Red Blond Green

R: [R] Change the result data

2004-02-27 Thread Vito Muggeo
3 4 5 6 7 8 9 10 11 12 13 14 15 as.vector(t(a)) [1] 1 4 7 10 13 2 5 8 11 14 3 6 9 12 15 hope this helps, vito - Original Message - From: Muhammad Subianto [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, February 27, 2004 12:28 PM Subject: [R] Change the result

RE: [R] Change the result data

2004-02-27 Thread John Fox
PROTECTED] Subject: [R] Change the result data Dear R-helper, I have a data like: hec.data -array(c(5,15,20,68,29,54,84,119,14,14,17,26,16,10,94,7), +dim=c(4,4), +dimnames=list(eye=c(Green,Hazel, Blue, Brown), +hair=c(Black, Brown, Red, Blond

Re: [R] Change the result data

2004-02-27 Thread Philipp Pagel
Using stack() would be a possibility: a - stack(as.data.frame(hec.data)) a$eye=rownames(hec.data) a values ind eye 1 5 Black Green 2 15 Black Hazel 3 20 Black Blue 4 68 Black Brown 5 29 Brown Green 6 54 Brown Hazel 7 84 Brown Blue 8 119 Brown

Re: [R] Change the result data (thanks you)

2004-02-27 Thread Muhammad Subianto
Dear R-helper, I use like this below (from Prof. Peter Dalgaard) and thanks to other R-helper for your help. Best regard, Muhammad Subianto as.data.frame(as.table(hec.data)) eye hair Freq 1 Green Black5 2 Hazel Black 15 3 Blue Black 20