Re: [R] Why points() is defined specially for a 1 by 2 matrix?

2009-10-19 Thread hadley wickham
 To answer one of your other questions: ggplot (and lattice) is/are very powerful, but base graphics are (a) easier to get your head around and (b) easier to adjust if you don't like the defaults.  Changing things just a little bit in ggplot can be difficult (as an example, the answer to your

Re: [R] Why points() is defined specially for a 1 by 2 matrix?

2009-10-18 Thread Richard M. Heiberger
points(x[4,],pch=2)# this is plotted as two points drops what it sees as an unnecessary dimension. Use points(x[4,, drop=FALSE], pch=2) See FAQ 7.5 tmp - matrix(1:2) tmp tmp[,1] tmp[,1,drop=FALSE] __ R-help@r-project.org mailing list

Re: [R] Why points() is defined specially for a 1 by 2 matrix?

2009-10-18 Thread Ben Bolker
Peng Yu wrote: On Sun, Oct 18, 2009 at 10:26 PM, Richard M. Heiberger r...@temple.edu wrote: points(x[4,],pch=2)# this is plotted as two points drops what it sees as an unnecessary dimension. Use points(x[4,, drop=FALSE], pch=2) See FAQ 7.5 tmp - matrix(1:2) tmp tmp[,1]