[R] (no subject)

Brett Stansfield brett at hbrc.govt.nz
Fri Mar 18 03:09:17 CET 2005


I recently tried to make R highlight certain features in a scatterplot
matrix

pairs(sleep[c("SlowSleep", "ParaSleep", "logbrw", "loglife", "loggest",
"logbw")],
*	col=1+as.integer(ParaSleep > 5.5))

	this worked fine but when I wanted to add another condition i.e
where another variable SlowSleep = 7.7, this is what I got
	> pairs(sleep[c("SlowSleep", "ParaSleep", "logbrw", "loglife",
"loggest", "logbw")],
*	col=1+as.integer(ParaSleep > 5.5 & SlowSleep=7.7))
	Error: syntax error
	> pairs(sleep[c("SlowSleep", "ParaSleep", "logbrw", "loglife",
"loggest", "logbw")],
*	col=1+as.integer(ParaSleep > 5.5 & SlowSleep= 7.7))
	Error: syntax error
	> pairs(sleep[c("SlowSleep", "ParaSleep", "logbrw", "loglife",
"loggest", "logbw")],
*	col=1+as.integer(ParaSleep > 5.5 & SlowSleep = 7.7))
	Error: syntax error
	I then tried two separate col statements as below
	> pairs(sleep[c("SlowSleep", "ParaSleep", "logbrw", "loglife",
"loggest", "logbw")],
*	col=1+as.integer(ParaSleep > 5.5)
*	col1=2+as.integer(SlowSleep = 7.7))
	Error: syntax error
	> pairs(sleep[c("SlowSleep", "ParaSleep", "logbrw", "loglife",
"loggest", "logbw")],
*	col=1+as.integer(ParaSleep > 5.5)
*	col=2+as.integer(SlowSleep = 7.7))
Error: syntax error
But still no joy, can you recommend anything
brett.




More information about the R-help mailing list