[R] plot only partial plots

Spencer Graves spencer.graves at pdf.com
Wed Sep 3 20:45:33 CEST 2003


I don't know about doing it all on the same line, but have you 
considered something like the following:

DF <- data.frame(x=1:9, y=1:9, z=rep(1:3, 3))
plot(DF$x, DF$y, type="n")
sel <- (DF$z>2)
text(DF$x[sel], DF$y[sel], letters[1:3])

hope this helps.  spencer graves

Monica Palaseanu-Lovejoy wrote:
> Hi everybody,
> 
> I would like to plot only a part of a data frame, and identify the 
> IDs for all the points with  values higher than a certain value. I 
> will try to be more explicit: 
> 
> I did a qqnorm plot of my data. It is obvious from the plot that 
> all the sample quantiles which are in Theoretical Quantiles = or > 
> than 1 belong to another group. To be sure about that I plot the 
> cooks.distance for the same data, and sure enough the data with 
> the indices grater than 250 (x axis) have obvious higher Cook ‘s 
> distance than the majority of the data. The data indices on the 
> Cook’s distance plot are different than my data ID (in my data 
> table) which is “character type”. How do I identify the IDs of the 
> data I am interested into, and how I can plot only the data with 
> Theoretical Quantiles equal or grater than 1? 
> 
> And, of course, how can I plot only the Cook’s distance for the 
> data with indices higher than a certain number, or Cook’s 
> distance higher than a certain number????
> 
> And, on the same line, how can I sort a tab-delimited table after 
> the values from one column? I know how to assign one column 
> to a vector and sort that vector, but what if I want to sort the 
> whole table, like in Excel for example?
> 
> Thank you in advance for all your time and answers,
> 
> Monica
> 
> 
> Monica Palaseanu-Lovejoy
> University of Manchester
> School of Geography
> Mansfield Cooper Building 
> Oxford Road, Manchester
> M13 9PL, UK. 
> email: monica.palaseanu-lovejoy at stud.man.ac.uk
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help




More information about the R-help mailing list