[ IT/프로그래밍 언어 ]
[R] binding & array
2024-01-25 18:02:35
바인딩 cbind() : Take a sequence of vector, matrix or data-frame arguments and combine by columns, respectively. These are generic functions with methods for other R classes. vector와 matrix, 그리고 data-frame을 열을 기준으로 바인딩할 수 있는 함수이다. rbind()는 위와 같은 특성을 띄지만 행을 기준으로 바인딩 시키는 함수이다. > a b cbind(a,b) a b [1,] 1 2 [2,] 2 4 [3,] 3 8 [4,] 4 16 > rbind(a,b) [,1] [,2] [,3] [,4] a 1 2 3 4 b 2 4 8 16 위의 설명에서도 알 수 ..