R/sumFunc.R

Defines functions `sumFunc`

`sumFunc` <-
function(x, cutoff) {
	tmp <- x/sum(x)
	final <- rep(0, length(x))
	for(i in 1:length(x)) {
		final[i] <- sum(tmp[1:i])
	}
	dim <- min(which(final > cutoff))
	return(dim)
}

Try the ebdbNet package in your browser

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

ebdbNet documentation built on Sept. 4, 2023, 5:07 p.m.