[R] 3-dimensional table

From: Jeffrey Stratford <stratja_at_auburn.edu>
Date: Sun 05 Feb 2006 - 23:36:08 EST


Hi,

Last week my class conducted an experiment by putting out clay caterpillars to look at the effects of urbanization, color, and location on caterpillar predation. There were two sites (urban, rural), three colors (green, yellow, red) and two locations at each site (edge, interior). The entire data set is below. I've checked out the MASS book, Dalgaard's book, and the R-help archives and I haven't found anything that suggests how to set up a spreadsheet for the xtab function (say, xtab(predation ~ location + site + color, data=class). It would not be a problem to input the data by hand but I wouldn't know how to set that up either. Any suggestions would be greatly appreciated. The class is mostly college sophmores and juniors and biology and education majors. We are using R 2.2.1 on Windows XP.

Again, many thanks,

Jeff

site	location	color	predated
Urban	Edge	Green	5
Urban	Edge	Red	30
Urban	Edge	Yellow	11
Urban	Interior	Green	11
Urban	Interior	Red	22
Urban	Interior	Yellow	22
Rural	Edge	Green	94
Rural	Edge	Red	40
Rural	Edge	Yellow	67
Rural	Interior	Green	40
Rural	Interior	Red	70
Rural	Interior	Yellow	33


****************************************
Jeffrey A. Stratford, Ph.D.
Postdoctoral Associate
331 Funchess Hall
Department of Biological Sciences
Auburn University
Auburn, AL 36849
334-329-9198
FAX 334-844-9234
http://www.auburn.edu/~stratja

R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Sun Feb 05 23:44:17 2006

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:42:23 EST