R/matrixDistance.R

Defines functions matrixDistance

Documented in matrixDistance

matrixDistance <- function(
    matrixA
,   matrixB
)
{
     distance <- 0
     for(i in 1:dim(matrixA)[1])
     {  distance <- distance +
                    dist(
                        rbind(
                            matrixA[i,]
                        ,   matrixB[i,]
                        )
                    )[1]
    }
    distance <- distance / dim(matrixA)[1]
}

Try the puma package in your browser

Any scripts or data that you put into this service are public.

puma documentation built on Nov. 8, 2020, 11:08 p.m.