I'm translating some Matlab code and need some help figuring
out how to change this call into an S4 generic method.
In matlab, there's a function called 'repmat' with three
calling sequences (all I have to deal with anyway):
1) B = repmat(A, m, n)
2) B = repmat(A, [m n])
3) B = repmat(A, n)
In all cases, A is the fill value, m is number of rows,
and n is number of columns.
As separate functions, the translations would roughly be:
repmat1 <- function(A, m, n) {
kronecker(matrix(1, n, m), A)
}
repmat2 <- function(A, rc) {
repmat1(A, rc[1], rc[2])
}
repmat3 <- function(A, n) {
repmat1(A, n, n)
}
Suggestions?
----------------------------------------------------------
SIGSIG -- signature too long (core dumped)
______________________________________________
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html