Hi all,

I'm searching for a way to exclude outliers from my dataset while making 
xyplots. While plotting using pairs(), I exclude specific row in my data frame 
and save the settings as a variable which I later include as an argument:

# Discard outliers and save settings as idx
idx=with(fieldTrial0809, which(Pro>0 & Pro<0.95 & Fum>0 & Fum<0.4  & Mal>0.1 & 
Mal<2.5 & Glc>2 & Glc<20 & Fru>1 & Fru<30 & Raf>0 & Raf<3 & Suc>1 & Suc<14))

#Plot the numerical and ranked columns pair wise using pairs()
pdf("ranked.pdf", height=20, width=20)
pairs(fieldTrial0809[idx, c(21,26,30,32,34,36,38,40,42,44,46,48,50)], 
main="Ranked", col="blue", pch="°", gap=0.2)
dev.off()

Now I'm trying to make xyplots to compare the result from three different 
categories:

# Plot Pro against Glc for each of the three categories
xyplot(Pro ~ Glc | Categories_BBCH_ID, data=fieldTrial0809, pch="°", 
layout=c(1, 3), aspect=1, index.cond=list(3:1))

I would like to exlude outliers like above. I've found that limits can be used 
in a similar manner as with xlim and ylim, but though I've read about them I 
don't understand how to solve it... Anyone who can help me?

All the best,

Joel


                                          
_________________________________________________________________
Hitta hetaste singlarna på MSN Dejting!
http://dejting.se.msn.com/channel/index.aspx?trackingid=1002952
        [[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.

Reply via email to