R/ylim.scale.R

#' @export
"ylim.scale" <-
function(ylim, scale = 0.)
{
	scale2 <- diff(ylim)
	if(scale2 < scale)
		rep(mean(ylim), 2.) + ((ylim - mean(ylim)) * scale)/scale2
	else ylim
}

Try the gam package in your browser

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

gam documentation built on Nov. 10, 2022, 5:52 p.m.