[R] Scalar vs. vector

Chris Fehily fehily at pacbell.net
Mon Apr 7 17:03:02 CEST 2003


Do these statements yield identical types of objects?
   x = 3
and
   y = c(3)

That is, intrinsically, is x, like y, a vector of length one, but created 
with abbreviated syntax?

More simply: Are scalars really trivial vectors?

Thanks.
-chris



More information about the R-help mailing list