[R] If it's not a data.frame, matrix or vector, what is it?

michael watson (IAH-C) michael.watson at bbsrc.ac.uk
Fri Dec 17 16:41:38 CET 2004


Hi

Forgive my ignorance.  I am selecting a column of a data.frame using the
column name, and I want to know what the resulting column "is".  My data
frame is called "submin" and the column name is held in a variable
called "display.gname" Eg:

> is.data.frame(submin)
[1] TRUE
> is.data.frame(submin[,display.gname])
[1] FALSE
> is.matrix(submin[,display.gname])
[1] FALSE
> is.vector(submin[,display.gname])
[1] FALSE
> length(submin[,display.gname])
[1] 4622

So if it's not a data.frame, a matrix or a vector, what is "it"?

Thanks (and sorry if this is in the FAQ)

Mick




More information about the R-help mailing list