A_Skelton73
A_Skelton73

Reputation: 1190

Matrix Math in R on Large Datasets

I've got a big square matrix, which I've taken the first row for testing purposes.... so the initial matrix is 1x63000, which is pretty big. Every time i try to multiply it by itself, using

a %*% b

Every time I do this, I get...

Error in fooB %*% fooB : non-conformable arguments

However, this works with smaller matrices. Are there any packages for handling mathematical functions of large matrices? or is there a trick I'm missing somewhere?

cheers

Upvotes: 0

Views: 101

Answers (1)

Andrie
Andrie

Reputation: 179428

You are looking for the crossproduct, i.e. a %*% t(a) and there is a base R function for this. Try:

crossprod(a)

Upvotes: 3

Related Questions