[R] Contingency table in R

2011-03-02 Thread Laura Clasemann

Hi,
 
I have a table in R with data I needed and need to create a contingency table 
out of it. The table I have so far looks like this:
 
 
   Binger
r
DietType No Yes
  Dangerous  15  12
  Healthy52   9
  None  134  24
  Unhealthy  72  23
 
These are the error messages that I keep getting whenever I try to get a 
contingency table. I'm not sure why it won't work for me, any help would be 
appreciated!
 nametable-table(excat,recat)
Error in table(excat, recat) : object 'excat' not found
  
[[alternative HTML version deleted]]

__
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.


[R] Help

2011-03-01 Thread Laura Clasemann

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@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.


[R] help

2011-02-28 Thread Laura Clasemann

Hi,
 
I was wondering if anyone could provide me with help in entering the  dataset  
below into R? I've been having a hard time in trying to figure out how to 
assemble it into both a frequency table and a bar graph within R. I've been 
trying to present the way I had the data arranged, as below, in Excel 
Spreadsheet into R. I am uncertain what the correct commands and exact 
techniques are into getting it correctly organized in R. Any help would be 
greatly appreciated! Thank you!

 
 
 




Diet 
Binger-Yes
Binger-No 
Total

None
24
134
158

Healthy
9
52
61

Unhealthy
23
72
95

Dangerous
12
15
27

Laura
  
[[alternative HTML version deleted]]

__
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.


[R] FW: help

2011-02-28 Thread Laura Clasemann


 




 







Hi,
 
I apologize for sending this again but realized that the data I had originally 
sent in my first email did not show correctly and wanted to send it again to 
give a better idea of how I am trying to show my data within R. Thanks!
 
Laura
 
 
Diet: Binger-yes:   Binger-No:  Total:
None   24134158
Healthy 9  52 61
Unhealthy  2372 95
Dangerous 1215 27
 
 
 On Mon, Feb 28, 2011 at 10:02 AM, Laura Clasemann violagirl...@msn.com 
 wrote:
 
  Hi,
 
  I was wondering if anyone could provide me with help in entering the  
  dataset  below into R? I've been having a hard time in trying to figure out 
  how to assemble it into both a frequency table and a bar graph within R. 
  I've been trying to present the way I had the data arranged, as below, in 
  Excel Spreadsheet into R. I am uncertain what the correct commands and 
  exact techniques are into getting it correctly organized in R. Any help 
  would be greatly appreciated! Thank you!
 
 
 
 
 
 
 
 
  Diet
  Binger-Yes
  Binger-No
  Total
 
  None
  24
  134
  158
 
  Healthy
  9
  52
  61
 
  Unhealthy
  23
  72
  95
 
  Dangerous
  12
  15
  27
 
  Laura
 
  
[[alternative HTML version deleted]]

__
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.


[R] Entering table with multiple columns rows

2011-02-28 Thread Laura Clasemann

Hi,
 
I'm having difficulty with getting a table to show with
multiple rows and columns. Below is the commands that I've typed in and
errors that I am getting. Thank you.

Laura 
 
 
Table trying to enter:
 
Diet: Binger-yes:   Binger-No:  Total:
None 24 134 158
Healthy 9 52 61
Unhealthy 23 72 95
Dangerous 12 15 27





 diet=matrix(c(24,134,9,52,23,72,12,15),ncol=4,byrow=TRUE)
 rownames(diet)=c(none, healthy, unhealthy, dangerous)
Error in dimnames(x) - dn :
  length of 'dimnames' [1] not equal to array extent
 diet=matrix(c(24,134,9,52,23,72,12,15), ncol=4, byrow=4)
 rownanes(diet)=c(none, healthy, unhealthy, dangerous)
Error in rownanes(diet) = c(none, healthy, unhealthy, dangerous) :
  could not find function rownanes-
 rownames(diet)=c(none, healthy, unhealthy, dangerous)
Error in dimnames(x) - dn :
  length of 'dimnames' [1] not equal to array extent
 diet=matrix(c(24,134,9,52,23,72,12,15), ncol=4, byrow=4)
 rownames(diet)=c(none, healthy, unhealthy, dangerous)
Error in dimnames(x) - dn :
  length of 'dimnames' [1] not equal to array extent


  
[[alternative HTML version deleted]]

__
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.


[R] R help

2011-02-27 Thread Laura Clasemann

Hi,
 
I was wondering if anyone could provide me with help in entering the attached 
dataset into R? I've been having a hard time in trying to figure out how to 
assemble it into both a frequency table and a bar graph within R. I've been 
trying to present the way I have the data arranged in Excel Spreadsheet into R. 
I am uncertain what the correct commands and exact techniques are into getting 
it correctly organized in R. Any help would be greatly appreciated! Thank you!
 
Laura Clasemann   __
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.