[R] numerics only

Thomas Lumley tlumley at u.washington.edu
Tue Nov 12 02:27:52 CET 2002

On Mon, 11 Nov 2002, Blew, Ted wrote:

> is there a way to identify the *numeric* data elements (columns) in a
> data.frame that contains both numeric and character data elements?  thanks
> in advance, ted.

   sapply(dataframe, is.numeric)
   which(sapply(data.frame, is.numeric))


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