Matrix Multiplication

I keep getting this message during matrix multiplication what can be the problem?

[1] 25
[1] 320
[1] 320
[1] 1
x1 %% y1
Error in x1 %
% y1 : requires numeric/complex matrix/vector arguments


Without your objects, it's impossible to say, but check out this answer on StackOverflow and see if that does the trick:

If not, could you please turn this into a self-contained reprex (short for reproducible example)? It will help us help you if we can be sure we're all working with/looking at the same stuff.


If you've never heard of a reprex before, you might want to start by reading the help page. The reprex dos and don'ts are also useful.

What to do if you run into clipboard problems

If you run into problems with access to your clipboard, you can specify an outfile for the reprex, and then copy and paste the contents into the forum.

reprex::reprex(input = "fruits_stringdist.R", outfile = "")

For pointers specific to the community site, check out the reprex FAQ.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.