On 05/14/2010 02:46 AM, Blue.Egg wrote:
...
I need to find out how can I on R, plot the mean egg of EGGS.H according to
the district, or sex.

Also how to compare the eggs of females on year of study x (in t.test)

Hi Blue.Egg,
You can always try barNest:

# first let's get more than one district
bluegg.df$DISTRICT<-factor(sample(c("PO","PQ"),25,TRUE))
barNest(EGGS.H~DISTRICT+SEX,data=bluegg.df,
 ylab="Mean number of eggs",
 barlabels=list("Overall",c("District PO","District PQ"),
 c("Male","Female")),main="Blue.Egg\'s breakdown of eggs",
 col=list("lightgray",c("green","orange"),c("pink","lightblue")))

and if you want nested bars, add showall=TRUE. For the t-test:

t.test(EGGS.H~SEX,bluegg.df)

Jim

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

Reply via email to