[R] Suggested add to the documentation for the identify() function
Vivek Satsangi
vivek.satsangi at gmail.com
Thu Nov 24 12:27:18 CET 2005
Folks,
1. Is there a more appropriate list (r-devel?) for posting such
suggestions? I am a newbie to R, and doubtless will have some
suggestions for the documentation -- some good, others not quite so. I
would actually like to help give back to the community (I was
motivated by Prof. Ripley's 2001 talk in which he had commented that
open source software users rarely give back anything.) -- but I know
very little right now, so I might make things worse in some cases.
2. I would like to suggest adding the following to the examples
section of the help on the identify function:
Suppose you want to be able to remove some points from your analysis.
In its simplest form, Identify() will give you the row number of the
points that you mark. Try running the following 3 commands:
>plot.new()
>plot(1:10, 1:10)
>identify(x=1:10, y=1:10, n=10)
What you will observe is that when you click on the points of the
plot , it will show the row number of those points.
If you are using some other function to produce your plot, identify
can work with that as well....Just use the same vectors in the
arguments to plot and identify.
Next, you can remove those outlier points from your data using -
> x1 <- x[-c(3,5,7), ]
In this case x is your orignal matrix and 3,5,7 are the row numbers
shown by identify() for your outlier data points.
See also: Negative subscripts
3. My most sincere apologies for sending HTML in my email to the
distribution list the last time.
-- Vivek Satsangi
More information about the R-help
mailing list