Re: [R] Define pch and color based on two different columns

2019-04-09 Thread Matthew Snyder
col = col) > } > ) > > From the little I understand about what you're trying to do, this may > just do the trick. > > Peter > > On Tue, Apr 9, 2019 at 2:43 PM Matthew Snyder > wrote: > > > > I am making a lattice plot and I would like

Re: [R] Define pch and color based on two different columns

2019-04-09 Thread Matthew Snyder
Sender notified by Mailtrack <https://mailtrack.io?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality5&;> 04/09/19, 9:28:11 PM On Tue, Apr 9, 2019 at 8:18 PM Jeff Newmiller wrote: > Maybe you should use factors rather than character columns. > > On

Re: [R] Define pch and color based on two different columns

2019-04-09 Thread Matthew Snyder
along and > sticking things into it." > -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) > > > On Tue, Apr 9, 2019 at 8:10 PM Matthew Snyder > wrote: > >> Thanks, Jim. >> >> I appreciate your contributed answer, but neither of

Re: [R] Define pch and color based on two different columns

2019-04-09 Thread Matthew Snyder
gt;data=mtcars, >col = mtcars$gear, >pch = mtcars$carb > ) > library(plotrix) > grange<-range(mtcars$gear) > xyplot(mpg ~ wt | cyl, >data=mtcars, >col = > color.scale(mtcars$gear,extremes=c("blue","red"),xrang

[R] Define pch and color based on two different columns

2019-04-09 Thread Matthew Snyder
I am making a lattice plot and I would like to use the value in one column to define the pch and another column to define color of points. Something like: xyplot(mpg ~ wt | cyl, data=mtcars, col = gear, pch = carb ) There are unique pch points in the second and third panels,