R/range.R

Defines functions rowrange colrange

Documented in colrange rowrange

#[export]
colrange <- function(x, cont = TRUE, parallel = FALSE,cores = 0) {
	if(cont){
		x <- .Call(Rfast_col_min_max,x,parallel,cores)
		return(x[2,]-x[1,])
	}
	.Call(Rfast_col_len_sort_un_int,x)
}

#[export]
rowrange <- function(x, cont = TRUE) {
  	if(cont){
		x <- .Call(Rfast_row_min_max,x)
		x[2,]-x[1,]
	}else{
		.Call(Rfast_row_len_sort_un_int,x)
	}
}

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.