orkun <[EMAIL PROTECTED]> writes: > Hello > > I need to use this command: > cbind(ftable(xtabs(cnt~geo+slp+con+hey,data=dt3)) > hey is in count of success /failure value > but cbind gives failure/success counts. I want to change the order of > this cbind as success /failure counts. > for instance: > I want cbind to give counts as 32-4552 rather than 4552-32 > > > what should I do ?
Well, all cbind does in that context is to remove the embellishments of the ftable structure, exposing the N x 2 internal matrix. Various other matrix operations, including indexing, has the same effect, e.g. data(Titanic) ftable(Titanic, row.vars = 1:3)[,] # same as using cbind() ftable(Titanic, row.vars = 1:3)[,2:1] # what you want -- O__ ---- Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - ([EMAIL PROTECTED]) FAX: (+45) 35327907 ______________________________________________ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
