Skip to content
Prev 82683 / 398513 Next

help with writing function

Does this do what you want:

IED <- function(risk){

	tmp <- outer(risk,risk,"-")
	tmp <- abs(tmp)
	return(tmp[lower.tri(tmp)])

}