R/lmean.R

Defines functions lmean

Documented in lmean

# mean of a list of elements for which the + operator
# and scalar division is well defined

lmean = function(list){
  l = length(list)
  o = list[[1]]/l
  for(i in 2:length(list)){
    o = o + list[[i]]/l
  }
  return(o)
}

Try the infinitefactor package in your browser

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

infinitefactor documentation built on April 3, 2020, 5:09 p.m.