[R] ftable and data.frame
John Kane
jrkrideau at inbox.com
Fri Dec 20 15:08:29 CET 2013
What does your original data look like? I seems to me that it would be better to give us that information since you may not want to use ftable() at all.
Ideally you should give us the original data or a sample of it. If it's confidential just replace the actual values with fake data. The structure of the data is more important than the values.
Please use dput() (see ?dput for information) to supply the data. Just do : dput(mydata) and then paste the result into the email.
John Kane
Kingston ON Canada
> -----Original Message-----
> From: silvano at uel.br
> Sent: Fri, 20 Dec 2013 11:01:26 -0200
> To: r-help at r-project.org
> Subject: [R] ftable and data.frame
>
> Hi,
>
> I used this command to produce a table:
>
> (tab1 = ftable(SEX, ESTCIV, Q1))
>
> Q1 B L M N
> SEXO ESTCIV
> F A 11 13 4 2
> E 1 0 0 0
> M A 5 0 3 1
> E 0 0 0 0
>
> but I need something like:
>
>
> SEXO ESTCIV B L M N
> F A 11 13 4 2
> F E 1 0 0 0
> M A 5 0 3 1
> M E 0 0 0 0
>
> How can I get it?
>
> I need this format to use ordinal logistic regression and I have many
> tables.
>
> Thanks,
>
> Silvano.
>
> ---
> Este email esta limpo de vmrus e malwares porque a protegco do avast!
> Antivmrus esta ativa.
>
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at 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.
____________________________________________________________
FREE 3D MARINE AQUARIUM SCREENSAVER - Watch dolphins, sharks & orcas on your desktop!
More information about the R-help
mailing list