R/adjust_bounds.R

Defines functions fix_lower fix_upper

fix_upper <- function(ub, x0) {
	if(any(ub<x0)) {
		warning("Some upper bounds are less than initial values, adjusting")
		x0[which(ub<x0)] <- ub[which(ub<x0)]
	}	
	return(ub)
}

fix_lower <- function(lb, x0) {
	if(any(lb>x0)) {
		warning("Some lower bounds are greater than initial values, adjusting")
		x0[which(lb>x0)] <- lb[which(lb>x0)]
	}	
	return(lb)
}

Try the OUwie package in your browser

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

OUwie documentation built on June 15, 2022, 5:15 p.m.