R/meanInterval.R

Defines functions meanInterval

Documented in meanInterval

meanInterval <-
function(interval){
	xmin = interval$minValue
	xmax = interval$maxValue
	m =length(xmin)
	mean = 0
	if(m != length(xmax)){
		print("the lenght of xmin and xmax must be the same")
	}else{
		mean = (sum(xmin)+ sum(xmax))/(2*m)
	}
	mean
}

Try the ISDA.R package in your browser

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

ISDA.R documentation built on May 31, 2017, 5:18 a.m.