[R] Help
Martyn Byng
Martyn.Byng at nag.co.uk
Tue Mar 1 11:22:23 CET 2011
Hi,
It is a bit unclear what it is you are trying to do, as mentioned in
replies by a variety of people previously, if you are just trying to get
your data into R and label rows / columns, then
tt = matrix(c(24,134,158,9,52,61,23,72,95,12,15,27),ncol=3,byrow=T)
rownames(tt) = c("None", "Healthy","Unhealthy","Dangerous")
colnames(tt) = c("Binger-yes:", "Binger-no:", "Total")
is sufficient, and bar charts can be created using the barplot command,
for example:
barplot(t(tt[,1:2]),legend.text=colnames(tt[,1:2]),xlab="Diet")
If you are trying to do something other than this then you will need to
supply some additional information
Martyn
-----Original Message-----
From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org]
On Behalf Of Laura Clasemann
Sent: 01 March 2011 04:05
To: r-help at r-project.org
Subject: [R] Help
Hi,
I've been working with R the past few days in trying to get a proper
table set up but have not had any luck at all and the manuals I've read
have not worked for me either. I was wondering if anyone here would be
able to help me in setting this data up in R both as a table and as a
bargraph as I have not been able to do it myself. If somebody could help
me with doing this and send me an overview in a document on how it
should look, I would really appreciate it. Thank you.
Laura
Diet: Binger-yes: Binger-No:
Total:
None 24 134 158
Healthy 9 52 61
Unhealthy 23 72 95
Dangerous 12 15 27
[[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.
________________________________________________________________________
This e-mail has been scanned for all viruses by Star.\ _...{{dropped:12}}
More information about the R-help
mailing list