Functions for some basic operations
myouter.Rd
Small utility functions
Details
myouter(x,y,fun)
computes the outer product of x
and
y
using the function fun
. The result is a matrix with
\((i,j)\)th element equal to fun(x[i],y[j])
. It is not
required for fun to be able to work with vector arguments. The function
does the computations in R using a simple double loop. So, it is a
convenience function, not a speed improving one.
shiftright(x,k)
rotates the vector x
k
positions
to the right.
shiftleft(x,k)
rotates the vector x
k
positions to
the left.