Re: [R] colored outliers

2012-01-21 Thread Geophagus
Thank you so much - now it works!
Tanks for your patience with me!
GeO


--
View this message in context: 
http://r.789695.n4.nabble.com/colored-outliers-tp4282207p4315743.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.


Re: [R] colored outliers

2012-01-20 Thread Geophagus
Dear Petr and Justin,
my problem ist, that I only want to have the 4 highest values for Ni as a
red point or with a red circle. The other points should not be modificated.
In your proposals always all points get a red circle or a red point not only
the 4 highest Ni values!
I hope you could understand me!
Thanks  for your help!
GeO


--
View this message in context: 
http://r.789695.n4.nabble.com/colored-outliers-tp4282207p4313278.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.


Re: [R] colored outliers

2012-01-20 Thread Justin Haynes
TOC_NI-read.csv2(C:/Users/hilliges/Desktop/Master/Daten/Statistik/TOC-NI.csv,
sep=;, dec=,, encoding=UTF-8)
circ-TOC_NI[order(TOC_NI$NI,decreasing=T),][1:4,]
plot(NI~TOC,data=TOC_NI,col=blue, pch=16, xlim=c(0,450))
abline(lm(NI~TOC,data=TOC_NI),col = red,lwd=3)
points(NI~TOC,data=TOC_NI,col='red',pch=1,size=3)  ## this line is coloring
all points because you're using TOC_NI still

points(NI~TOC,data=circ,col='red',pch=1,size=3)  ## now we're only plotting
the four points in circ.


sorry for the confusion.  however, in the future please provide a
reproducible data set along with your question so we can more easily help.

Justin


On Fri, Jan 20, 2012 at 5:49 AM, Geophagus
falk.hilli...@twain-systems.comwrote:

 Dear Petr and Justin,
 my problem ist, that I only want to have the 4 highest values for Ni as a
 red point or with a red circle. The other points should not be modificated.
 In your proposals always all points get a red circle or a red point not
 only
 the 4 highest Ni values!
 I hope you could understand me!
 Thanks  for your help!
 GeO


 --
 View this message in context:
 http://r.789695.n4.nabble.com/colored-outliers-tp4282207p4313278.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.


Re: [R] colored outliers

2012-01-13 Thread Geophagus
Hi Justin, 
it still does not work.
All points become red.

I use this skript with your modifications:

TOC_NI-read.csv2(C:/Users/hilliges/Desktop/Master/Daten/Statistik/TOC-NI.csv,
sep=;, dec=,, encoding=UTF-8)
circ-TOC_NI[order(TOC_NI$NI,decreasing=T),][1:4,] 
plot(NI~TOC,data=TOC_NI,col=blue, pch=16, xlim=c(0,450))
abline(lm(NI~TOC,data=TOC_NI),col = red,lwd=3)
points(NI~TOC,data=TOC_NI,col='red',pch=1,size=3) 

Maybe the the Sourcefile will help to solve the prob?
http://r.789695.n4.nabble.com/file/n4291954/TOC-NI.csv TOC-NI.csv 

Thank you so muich!
GeO






--
View this message in context: 
http://r.789695.n4.nabble.com/colored-outliers-tp4282207p4291954.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.


Re: [R] colored outliers

2012-01-13 Thread Petr PIKAL
Hi

what do you want to achieve?

 
 Hi Justin, 
 it still does not work.
 All points become red.
 
 I use this skript with your modifications:
 
 
TOC_NI-read.csv2(C:/Users/hilliges/Desktop/Master/Daten/Statistik/TOC-NI.csv,
 sep=;, dec=,, encoding=UTF-8)
 circ-TOC_NI[order(TOC_NI$NI,decreasing=T),][1:4,] 
 plot(NI~TOC,data=TOC_NI,col=blue, pch=16, xlim=c(0,450))

Points are plotted as a small circles in blue, you can make the points 
bigger by let say cex=2

 abline(lm(NI~TOC,data=TOC_NI),col = red,lwd=3)

red line is plotted according to linear model

 points(NI~TOC,data=TOC_NI,col='red',pch=1,size=3) 

all points are newly plotted as red circles (and possibly overplot the 
former ones). There is no size parameter for plot command, therefore it is 
ommited.

see
?plot.default and ?par for available options.

You maybe want cex=3 to get those new points as bigger circles.

Regards
Petr


 
 Maybe the the Sourcefile will help to solve the prob?
 http://r.789695.n4.nabble.com/file/n4291954/TOC-NI.csv TOC-NI.csv 
 
 Thank you so muich!
 GeO
 
 
 
 
 
 
 --
 View this message in context: http://r.789695.n4.nabble.com/colored-
 outliers-tp4282207p4291954.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.

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


[R] colored outliers

2012-01-10 Thread Geophagus
Hi @ all,
I have question how to mark significant outliers in R.
This is my very simple script to plot a regression:

TOC_NI-read.csv2(C:/Users/XYZ/Desktop/Master/Daten/Statistik/TOC-NI.csv,
sep=;, dec=,, encoding=UTF-8)
plot(NI~TOC,data=TOC_NI,col=blue, pch=16, xlim=c(0,450))
abline(lm(NI~TOC,data=TOC_NI),col = red,lwd=3)
summary(lm(NI~TOC,data=TOC_NI))

The result is the following pic:
http://r.789695.n4.nabble.com/file/n4282207/nickel_TOC_5f.png
nickel_TOC_5f.png 

Now I want to make small red circles around the four highest values of Ni.
Does anyone has an idea how to do that?
Thanks a lot!

Best Regards 
Geophagus




--
View this message in context: 
http://r.789695.n4.nabble.com/colored-outliers-tp4282207p4282207.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.


Re: [R] colored outliers

2012-01-10 Thread Justin Haynes
# find top 4 points
circ
- 
TOC_NI[order(TOC_NI$NI,decreasing=T),][1:4,]TOC_NI[order(TOC_NI$NI,decreasing=T),][1:4,]

# add them to your plot!
plot(NI~TOC,data=TOC_NI,col=blue, pch=16, xlim=c(0,450))
abline(lm(NI~TOC,data=TOC_NI),col = red,lwd=3)
points(NI~TOC,data=TOC_NI,col='red',pch=1,size=3)



Justin

On Tue, Jan 10, 2012 at 7:11 AM, Geophagus
falk.hilli...@twain-systems.comwrote:

 Hi @ all,
 I have question how to mark significant outliers in R.
 This is my very simple script to plot a regression:

 TOC_NI-read.csv2(C:/Users/XYZ/Desktop/Master/Daten/Statistik/TOC-NI.csv,
 sep=;, dec=,, encoding=UTF-8)
 plot(NI~TOC,data=TOC_NI,col=blue, pch=16, xlim=c(0,450))
 abline(lm(NI~TOC,data=TOC_NI),col = red,lwd=3)
 summary(lm(NI~TOC,data=TOC_NI))

 The result is the following pic:
 http://r.789695.n4.nabble.com/file/n4282207/nickel_TOC_5f.png
 nickel_TOC_5f.png

 Now I want to make small red circles around the four highest values of Ni.
 Does anyone has an idea how to do that?
 Thanks a lot!

 Best Regards
 Geophagus




 --
 View this message in context:
 http://r.789695.n4.nabble.com/colored-outliers-tp4282207p4282207.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.


Re: [R] colored outliers

2012-01-10 Thread Geophagus
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)
circ-TOC_NI[order(TOC_NI$NI,decreasing=T),]
plot(NI~TOC,data=TOC_NI,col=blue, pch=16, xlim=c(0,450))
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.


Re: [R] colored outliers

2012-01-10 Thread Justin Haynes
woops! see inline.


Hope that helps, and enjoy R.


Justin

On Tue, Jan 10, 2012 at 8:40 AM, Geophagus
falk.hilli...@twain-systems.comwrote:

 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,450))
 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.