For the following code is there a way to make the jitter all line up
horizontally, instead of them being just randomly spread around a value. So for
ex if there are multiple values at 63 for genotype wt then all the values
should be plotted on the same y value of 63 but spaced apart by a certain
factor or noise..
library(lattice);
dataFrame <- as.data.frame(t(structure(c(
64,'wt',
62,'wt',
66,'wt',
65,'wt',
60,'wt',
61,'wt',
65,'wt',
66,'wt',
65,'wt',
63,'wt',
67,'wt',
65,'wt',
62,'wt',
65,'wt',
68,'wt',
65,'wt',
63,'wt',
65,'wt',
62,'wt',
65,'wt',
66,'wt',
62,'wt',
65,'wt',
65,'wt',
66,'wt',
65,'wt',
62,'wt',
65,'wt',
66,'wt',
65,'wt',
61,'wt',
65,'wt',
66,'wt',
65,'wt',
62,'wt',
63,'het',
67,'het',
60,'het',
67,'het',
66,'het',
62,'het',
65,'het',
62,'het',
61,'het',
62,'het',
66,'het',
60,'het',
65,'het',
65,'het',
61,'het',
64,'het',
68,'het',
64,'het',
63,'het',
62,'het',
64,'het',
62,'het',
64,'het',
65,'het',
60,'het',
65,'het',
70,'het',
63,'het',
67,'het',
66,'het',
65,'hom',
62,'hom',
68,'hom',
67,'hom',
67,'hom',
63,'hom',
67,'hom',
66,'hom',
63,'hom',
72,'hom',
62,'hom',
61,'hom',
66,'hom',
64,'hom',
60,'hom',
61,'hom',
66,'hom',
66,'hom',
66,'hom',
62,'hom',
70,'hom',
65,'hom',
64,'hom',
63,'hom',
65,'hom',
69,'hom',
61,'hom',
66,'hom',
65,'hom',
61,'hom',
63,'hom',
64,'hom',
67,'hom'), .Dim=c(2,98))));
colnames(dataFrame) <- c('marbles_buried', 'genotype');
dataFrame[c("marbles_buried")] <- lapply(dataFrame[c("marbles_buried")],
function(x) as.numeric(levels(x)[x]));
trellis.par.set(theme = col.whitebg());
stripplot(jitter(marbles_buried) ~ genotype, data = dataFrame, aspect = 1,
jitter = TRUE, xlab='Genotype', ylab = "Marbles Buried", main='MBA WTs Vs
HOMs');
Thanks,
Sandeep Kumar Ghosh
Lexicon Genetics, Inc.,
8800 Technology Forest,
The Woodlands, TX 77380
(281) 863-3479
Internal Extension - 3479
[[alternative HTML version deleted]]
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html