내가 변환 에 tm
패키지의 TermDocumentMatrix()
로 만든 다음 간단한 삼중 매트릭스를 시도하고있다 "를 simple_triplet_matrix을"Transform 클래스의클래스 클래스에서 "매트릭스"
A term-document matrix (317443 terms, 86960 documents)
Non-/sparse entries: 18472230/27586371050
Sparsity : 100%
Maximal term length: 653
Weighting : term frequency (tf)
[1] "TermDocumentMatrix" "simple_triplet_matrix"
조밀 한 모체에.
dense <- as.matrix(tdm)
그러나
오류Error in vector(typeof(x$v), nr * nc) : vector size cannot be NA
In addition: Warning message:
In nr * nc : NAs produced by integer overflow
정말 오류 및 경고 메시지를 이해할 수를 생성합니다. 작은 데이터 세트에서 오류를 복제하려고하면 동일한 문제가 발생하지 않습니다.
library(tm)
data("crude")
tdm <- TermDocumentMatrix(crude)
as.matrix(tdm)
this answer에서 slam
패키지를 통해 유사한 문제가 해결되었음을 알았습니다 (비록 질문이 합계 연산에 관한 것이었지만 조밀 한 행렬로의 변환이 아니 었음). slam
설명서를 열람했지만 클래스 simple_triplet_matrix
의 객체를 matrix
의 객체로 변환하는 특정 함수를 찾을 수 없습니다.
행 수 xs 열 수 'nr * nc'는 사용 가능한 저장 영역에 비해 너무 큽니다. –