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

Liaw, Andy andy_liaw at merck.com
Fri Dec 17 16:54:54 CET 2004


What does str(submin$display.gname) say?

Andy

> From: michael watson (IAH-C)
> 
> 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
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! 
> http://www.R-project.org/posting-guide.html
> 
>




More information about the R-help mailing list