美文网首页
R语言基础(二)

R语言基础(二)

作者: 见龙在田007er2770 | 来源:发表于2019-07-10 16:06 被阅读0次

对象

1. 数据的类型与结构

1.1 数据的结构

Homogeneous Heterogeneous
1d vector list
2d matrice data.frame
3d array

1.2 原子数据的类型
atomic vector包括 char\ integer\ double\ logical\ complex\ raw.

2. 数据的属性

2.1 Property(属性)的定义

atomic vector and list have 3 common properties: type length and attributes.

Type, typeof(), what it is.

Length, length(), how many elements it contains.

Attributes,attributes(), additional arbitrary metadata.

2.2 three most important Attributes

Names, a character vector giving each element a name.

Dimensions, used to turn vectors into matrices and arrays.

Class, used to implement the S3 object system.

PS: 对象(object)的界面(interface)就是属性(properties)和方法(method)。
来自《自学是门手艺--class》

相关文章

网友评论

      本文标题:R语言基础(二)

      本文链接:https://www.haomeiwen.com/subject/zcdjtctx.html