1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

R > データ構造 > データフレーム > Sleepオブジェクト / summary()

Last updated at Posted at 2016-09-22
動作環境
RStudio 0.99.903 on Windows 7 pro
R version 3.3.1 

R機能マップ http://qiita.com/7of9/items/0f911bcb95d3a8bbd703

参考 Rで学ぶデータ・プログラミング入門 by 石田基広さん

p42

データフレーム
Rでもっとも重要なデータ構造です。...Sleepオブジェクトを取り上げます。

> head(sleep)
  extra group ID
1   0.7     1  1
2  -1.6     1  2
3  -0.2     1  3
4  -1.2     1  4
5  -0.1     1  5
6   3.4     1  6
> summary(sleep)
     extra        group        ID   
 Min.   :-1.600   1:10   1      :2  
 1st Qu.:-0.025   2:10   2      :2  
 Median : 0.950          3      :2  
 Mean   : 1.540          4      :2  
 3rd Qu.: 3.400          5      :2  
 Max.   : 5.500          6      :2  
                         (Other):8  
> sleep$extra
 [1]  0.7 -1.6 -0.2 -1.2 -0.1  3.4  3.7  0.8  0.0  2.0  1.9
[12]  0.8  1.1  0.1 -0.1  4.4  5.5  1.6  4.6  3.4
> sleep$group
 [1] 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2
Levels: 1 2
> sleep$ID
 [1] 1  2  3  4  5  6  7  8  9  10 1  2  3  4  5  6  7  8  9 
[20] 10
Levels: 1 2 3 4 5 6 7 8 9 10
1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?