Skip to content

overlay points on plot

4 messages · femke, Brian Ripley, Tom Blackwell +1 more

#
Is v a data frame?  In that case you need v[[2]] and v[[3]], as v[2] is a 
data frame.
On Wed, 18 Feb 2004, femke wrote:

            

  
    
#
The solution is found in  help("Subscript").
The subscripting you show inside the function  points()
returns a data frame of one column.  This is indeed a
list and not a vector.  There are several ways to subscript
a data frame that will return one column as a vector.
If you use one of them, this should all work.

The 40 page document "An Introduction to R" may also be
helpful.  In other words, this is pretty thoroughly covered
in the documentation.

-  tom blackwell  -  u michigan medical school  -  ann arbor  -
On Wed, 18 Feb 2004, femke wrote:

            
#
What do you get from the following: 

      class(v)
      class(v[2])

      If class(v) is "list", then class(v[2]) will also be "list".  In 
that case try the following: 

	points(v[[2]],v[[3]])

    
      hope this helps.  spencer graves
femke wrote: