Why is the class of a vector the class of the elements of the vector and not vector itself?

前端 未结 4 1900
时光说笑
时光说笑 2020-12-16 02:48

I don\'t understand why the class of a vector is the class of the elements of the vector and not vector itself.

vector <- c(\"la\", \"la\", \"la\")
class         


        
4条回答
  •  醉话见心
    2020-12-16 03:55

    In the R language definition, there are six basic types of vector, one of which is "character". There really isn't a base "vector" type, but six different kinds of vectors that are all base types.

    On the other hand, Matrix is a type of data structure.

提交回复
热议问题