[R] inverse table

Patrizio Frederic frederic.patrizio at gmail.com
Wed Jun 15 18:10:15 CEST 2016


Dear R-users,
I've a problem that puzzle me

suppose I have a two way contigency  table

a <- sample(al <- letters[1:10],100,T)
b <- sample(bl <- LETTERS[1:5],100,T)
ab <- cbind(a,b)

ddd <- (xtabs(data = ab))
ddd <- as.matrix(ddd)

the question is: how do I reverse the code, thus how do I get raw data
(object ab) from ddd?

I've tried

as.data.frame.table(ddd)

which is not the answer I'm looking for.
Thanks in advance,

PF



-- 
+---------------------------------------------------------------
| Patrizio Frederic,
| http://morgana.unimore.it/frederic_patrizio/
+---------------------------------------------------------------

	[[alternative HTML version deleted]]



More information about the R-help mailing list