[BioC] How to get the type of a vector?

Peng Yu pengyu.ut at gmail.com
Fri Aug 21 04:49:29 CEST 2009


Hi,

Please see the code below this message. 'a' is a vector, 'b' is a
scalar. But their types are show the same ('numeric'). If I use
'class()', I will not be able to tell the type difference between a
vector and a scalar. I am wondering if there is any other command that
can tell the type difference between a vector and a scalar.

Regards,
Peng

> a=c(1,2,3)
> class(a)
[1] "numeric"
> b=2
> class(b)
[1] "numeric"



More information about the Bioconductor mailing list