データのマージ (結合) 横にくっつける (列の追加) merge関数で2つのデータフレームを横にくっつけられる。R-tipsも参考。 # 例示データ datA <- data.frame(id=paste("ps", 1:10, sep=""), v1=rnorm(10), v2=gl(2, 5, label=c("ga", "gb")), v3=sample(1:5, replace=T)) datB <- data.frame(id=paste("ps", 101:110, sep=""), v2=gl(2, 5, label=c("gb", "gc")), v3=sample(1:5, replace=T)) # id重複なし datC <- data.frame(id=paste("ps", 1:6, sep=""), v5=rnorm(6)) # id重複 # 確認しよう da