R/Diag.R

Defines functions Diag.matrix Diag.fill

Documented in Diag.fill Diag.matrix

#[export]
Diag.fill <- function(x,v=0) {
	if(length(v)>1){
		.Call(Rfast_diag_fill_vec,x,v)
	}else{
		.Call(Rfast_diag_fill_scalar,x,v)
	}
}
#[export]
Diag.matrix <- function(len,v=0) {
	if(length(v)>1){
		.Call(Rfast_diag_matrix_fill_vec,len,v)
	}else{
		.Call(Rfast_diag_matrix_fill_scalar,len,v)
	}
}

Try the Rfast package in your browser

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

Rfast documentation built on Nov. 9, 2023, 5:06 p.m.