R/maxMatrixSize.R

Defines functions maxMatrixSize

Documented in maxMatrixSize

maxMatrixSize <- function(ram, units=c("MB", "bytes", "KB", "GB", "TB"), nCopies=3) {
	units <- match.arg(units)
	switch(units,
			"bytes" = { units <- 0 },
			"KB" = {units <- 1 },
			"MB" = { units <- 2 },
			"GB" = { units <- 3 },
			"TB" = { units <- 4 }
	)
	
	return(floor(sqrt(ram*(1024^units)/(8*nCopies))))
	
}

Try the PCIT package in your browser

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

PCIT documentation built on May 29, 2017, 11 a.m.