[R] Extracting Numeric Columns from Data Fram
ruipbarradas at sapo.pt
Sat Feb 16 20:11:12 CET 2013
You should provide us with a data example, like the posting guide says.
Anyway, see the following example.
# make up some data
dat <- data.frame(X = 1:4, Y = rnorm(4), Z = letters[1:4])
# this returns the numeric/integer columns
Hope this helps,
Em 16-02-2013 18:15, Barry DeCicco escreveu:
> I've got a data frame with a mix of numeric, integer and factor columns.
> I'd like to pull out (or just operate only on) the numeric/integer columns.
> Every thing I've found in searches is about how to subset by rows,
> or how to operate assuming you have the column names. I'd like to pull
> by type.
> [[alternative HTML version deleted]]
> R-help at r-project.org mailing list
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help