Andrea Marcela Huerfano Barbosa
2016-Sep-23 14:07 UTC
[R] How to construct a double-entry with variables from a dataset
Hi everyone, My name is Marcela, I am bachelor student of statistics. I have a data frame with 59 variables and two of them are categorical and have three levels each one, I would like to construct a double -entry table with this variables, I mean the categorical ones. Any help will be really thankful Thanks for reading Andrea Marcela -- [[alternative HTML version deleted]]
Michael Dewey
2016-Sep-23 15:22 UTC
[R] How to construct a double-entry with variables from a dataset
Dear Marcela Can you clarify what you mean by a double entry table? On 23/09/2016 15:07, Andrea Marcela Huerfano Barbosa wrote:> Hi everyone, > My name is Marcela, I am bachelor student of statistics. > I have a data frame with 59 variables and two of them are categorical and > have three levels each one, I would like to construct a double -entry > table with this variables, I mean the categorical ones. > > Any help will be really thankful > > Thanks for reading > Andrea Marcela > -- > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > 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. >-- Michael http://www.dewey.myzen.co.uk/home.html
ruipbarradas at sapo.pt
2016-Sep-23 15:26 UTC
[R] How to construct a double-entry with variables from a dataset
Hello, Is this what you mean? dat <- data.frame(x = rnorm(100), A = factor(sample(3, 100, TRUE)), B = factor(sample(3, 100, TRUE))) xtabs(~ A + B, dat) Hope this helps, Rui Barradas Citando Andrea Marcela Huerfano Barbosa <anmhuerfanoba at unal.edu.co>:> Hi everyone, > My name is Marcela, I am bachelor student of statistics. > I have a data frame with 59 variables and two of them are categorical and > have three levels each one, I would like to construct a double -entry > table with this variables, I mean the categorical ones. > > Any help will be really thankful > > Thanks for reading > Andrea Marcela > -- > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > 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.