[R] Levels of a vector for a contour plot

Art Salwin salwin at mitretek.org
Wed Apr 5 22:40:55 CEST 2000


Is there something more elegant than

xlevels<-as.numeric(levels(factor(x)))

to get the levels found in vector x?  xlevels will be used
to generate
a contour plot as in
contour(xlevels,ylevels,zvals)

where zvals<-tapply(z,list(x,y),mean)

-- 
Art Salwin
salwin at mitretek.org
(202) 863-2985
(202) 863-2988 (fax)
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list