특정 컬럼 데이터 선택하기
> library(boot)
> data(nodal)
> head(nodal)
m r aged stage grade xray acid
1 1 1 0 1 1 1 1
2 1 1 0 1 1 1 1
3 1 1 0 1 1 1 1
4 1 1 0 1 1 1 1
5 1 1 0 1 1 1 1
6 1 0 0 1 1 1 1
> a <- c(2,4,6,7)
> data <- nodal[,a]
> head(data)
r stage xray acid
1 1 1 1 1
2 1 1 1 1
3 1 1 1 1
4 1 1 1 1
5 1 1 1 1
6 0 1 1 1