[R] why should you set the mode in a vector?

Joel Bremson joel3000 at gmail.com
Fri Oct 29 23:41:18 CEST 2004

Hi all,

If I write

v = vector(mode="numeric",length=10)

I'm still allowed to assign non-numerics to v.

Furthermore, R figures out what kind of vector I've got anyway
when I use the mode() function.

So what is it that assigning a mode does?


More information about the R-help mailing list