R/coef.sma.R

coef.sma <- function(object, ...){

	x <- object
	if(length(x$coef) == 1){
		res <- x$coef[[1]][,1]
		names(res) <- c("elevation","slope")
	} else {
		res <- lapply(x$coef, "[", 1)
		res <- as.data.frame(do.call("rbind",lapply(res, t)))
		rownames(res) <- names(x$coef)
	}
	return(res)
	
}

Try the smatr package in your browser

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

smatr documentation built on May 2, 2019, 1:04 p.m.