Skip to content

help with writing function

1 message · Greg Snow

#
Does this do what you want:

IED <- function(risk){

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

}