LoginSignup
1
2

More than 5 years have passed since last update.

R > データ構造 > データフレーム > 構造確認 > str()

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 石田基広さん

str()で構造が分かるようだ。

> o<-data.frame(w<-0:2, x<-1:3, y<-3:1, z<-5:3)
> nrow(o)
[1] 3
> ncol(o)
[1] 4
> o
  w....0.2 x....1.3 y....3.1 z....5.3
1        0        1        3        5
2        1        2        2        4
3        2        3        1        3
> str(o)
'data.frame':   3 obs. of  4 variables:
 $ w....0.2: int  0 1 2
 $ x....1.3: int  1 2 3
 $ y....3.1: int  3 2 1
 $ z....5.3: int  5 4 3
1
2
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
2