woops! see inline.

Hope that helps, and enjoy R.


Justin

On Tue, Jan 10, 2012 at 8:40 AM, Geophagus
<falk.hilli...@twain-systems.com>wrote:

> Hi Justin,
> thanks a lot for your quick answer.
> If I use your code, all points become red.
> How do you include the sorted and separated four values into the "points"
> argument?
> The variable in your script is called "circ" but this is not fronted up
> anymore.
> Here the script again:
>
>
> TOC_NI<-read.csv2("C:/Users/hilliges/Desktop/Master/Daten/Statistik/TOC-NI.csv",
> sep=";", dec=",", encoding="UTF-8")
>

this line just needs trimming.  not sure how i missed that on my copy...
anyway, order puts the data.frame in order of the given vector, default
behavior sorts in ascending order unless you specify decreasing=TRUE.

circ<-TOC_NI[order(TOC_NI$NI,decreasing=T),][1:4,]
>

and it should work


> plot(NI~TOC,data=TOC_NI,col="blue", pch=16, xlim=c(0,4500000))
> abline(lm(NI~TOC,data=TOC_NI),col = "red",lwd=3)
> points(NI~TOC,data=TOC_NI,col='red',pch=1,size=3)
>
> Thanks a lot for your help!
> GeO
>
>
>
> --
> View this message in context:
> http://r.789695.n4.nabble.com/colored-outliers-tp4282207p4282481.html
> Sent from the R help mailing list archive at Nabble.com.
>
>
______________________________________________
> 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.
>

        [[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