변수이름을 바꿔야 할 경우가 흔히 발생한다.
> test.matrix <- matrix(sample(1:12), ncol=3)
> test.data.frame <- as.data.frame(test.matrix)
> str(test.data.frame)
> names(test.data.frame)[c(2)] <- c("둘")
> str(test.data.frame)
'R > R terminal mode' 카테고리의 다른 글
R + Crontab - Scheduling Rscript (0) | 2018.11.23 |
---|---|
R 12개를 동시에 (CentOS7, mem 256GB, cpu 16 core) (0) | 2016.12.25 |
R base - grep() - gsub() - 숫자들 중간의 , (comma)를 제거해야할 경우 흔히 사용 (0) | 2012.03.26 |
as.Date() - 요인형 변수로 불러들여진 값들을 다시 날짜형 변수로 바꾸는 법 (0) | 2012.03.23 |
R - base - sample(), matrix() (0) | 2012.03.08 |