powered by
Returns the dot product of two numeric iterables of equal length
dotproduct(vec1, vec2)
the dot product of the iterators
the first
the second iterable object
it <- iteror(1:3) it2 <- iteror(4:6) dotproduct(it, it2) # 32 it <- iteror(1:4) it2 <- iteror(7:10) dotproduct(1:4, 7:10) # 90
Run the code above in your browser using DataLab