Skip to content
Prev 4839 / 398506 Next

variable name to hist within apply?

On 10 Mar 2000, Brian P. Flaherty wrote:

            
Yes, but the argument with which hist is called is newX[,i] (if you look
inside the code for apply)
apply((1:NCOL(toblo.df))[-c(40,52)],
	function (i) hist(toblo.df[,i],main=names(toblo.df)[i]))

should work.  We don't have an analogue of the lisp mapcar function which
takes multiple data arguments (like the data and the names in this case).


	-thomas

Thomas Lumley
Assistant Professor, Biostatistics
University of Washington, Seattle

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._