
上QQ阅读APP看书,第一时间看更新
5-6 将行名或列名作为索引
R的重要特色是,当一个矩阵有了行名和列名后,可以用这些名称代替数字型的索引,取得矩阵对象的元素,让整个程序的可读性更高。
实例ch5_44:使用baskets.New对象,取得Lin第3场的进球数。

实例ch5_45:使用baskets.New对象,取得Jordon第2场和第5场的进球数。

实例ch5_46:使用baskets.New对象,取得Jordon所有场次的进球数。

实例ch5_47:使用baskets.New对象,取得第5场所有球员的进球数。
