R/ssm_optset.R

Defines functions ssm_optset

Documented in ssm_optset

ssm_optset <-
function(default,opts){
	
	if (length(opts)){
		opts_names <- names(opts);
		default_names <- names(default);
		
		low_opts_names = tolower(opts_names);
		low_default_names = tolower(default_names);
			
		for (i in 1:length(opts_names)){
			j <- match(low_opts_names[i],low_default_names)
			if (is.na(j)){
				cat("Option '",low_opts_names[i],"'is not defined in eSS. It will be ignored \n")
			
			} else{
				default[[j]]<-opts[[i]];
			}
		}
	}
	opts=default;
	return(opts)
}

Try the MEIGOR package in your browser

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

MEIGOR documentation built on Nov. 8, 2020, 7:46 p.m.