R/sphere.R

Defines functions sphere

sphere <- function(x){
  if (is.matrix(x)) {
    sqrt(rowSums(x^2))
  } else sqrt(sum(x^2))
}

Try the ExpDE package in your browser

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

ExpDE documentation built on May 2, 2019, 9:11 a.m.