R/sum.R

Defines functions rowsums colsums

Documented in colsums rowsums

#[export]
colsums <- function(x,indices = NULL,parallel = FALSE,na.rm = FALSE,cores = 0) {
	if(parallel){
		.Call(Rfast_col_sums_p,x,cores)
	}else{
  		.Call(Rfast_col_sums,x,indices,na.rm)
	}
}

#[export]
rowsums <- function(x,indices = NULL,parallel = FALSE,na.rm = FALSE,cores = 0) {
	if(parallel){
  		.Call(Rfast_row_sums_p,x,cores)
  	}else{
  		.Call(Rfast_row_sums,x,indices,na.rm)
  	}
}

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.