R/MeanModule3D.R

MeanModule3D <- function (coord) 
{
    x <- coord[, 1]
    y <- coord[, 2]
    z <- coord[, 3]
	
    n_elements = length(x)
    R = sqrt((sum(x) * sum(x)) + (sum(y) * sum(y)) + (sum(z) * 
        sum(z)))
    mean_module = R/n_elements
    return(mean_module)
}

Try the VecStatGraphs3D package in your browser

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

VecStatGraphs3D documentation built on May 1, 2019, 8:03 p.m.