데이터 분석/[R] 기초
[R] 컬럼명 변경하기
INCHELIN
2021. 7. 23. 10:10
728x90
1. [행,열]로 접근하기
df <- df[,1:3] # 1~3번째 컬럼(열)만 가져오기
2. subset( )
df <- subset(df, -col.1) # 'col.1' 컬럼 제외
df <- subset(df, -c(col.1)) # 'col.1' 컬럼 제외
df <- subset(df, -c(col.1, col.2)) # 'col.1', 'col.1' 컬럼 제외
728x90