Displaying 1 result from an estimated 1 matches for "geninv".
Did you mean:
genind
2009 Aug 31
2
Problem in matrix definition?
I'm implementing a function to compute the moore-penrose inverse, using a code from the article: Fast Computation of Moore-Penrose Inverse Matrices. Neural Information Processing - Letters and Reviews. Vol.8, No.2, August 2005
However, the R presents an error message when I use the geninv.
The odd thing is that the error occurs for some arrays, however they have the same size. And the R indicates the lack of compatibility between the matrix!
Below is an example:
Creating the function geninv
geninv <- function(x)
{
m <- dim(x)[1]
n <- dim(x)[2]
tr <- 0
if(m <...