I think that what you need to do is

        as.table(as.matrix(dff))

E.g.

        melvin <- data.frame(x=c(3,1,3,2),y=c(3,3,4,5))
        clyde   <- as.table(as.matrix(melvin))
        prop.table(clyde,1)

           x         y
A 0.5000000 0.5000000
B 0.2500000 0.7500000
C 0.4285714 0.5714286
D 0.2857143 0.7142857

HTH.

                        cheers,

                                Rolf Turner

######################################################################
Attention:\ This e-mail message is privileged and confidenti...{{dropped}}

______________________________________________
R-help@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.

Reply via email to