R/scanVectorMayNotExist.R

Defines functions scanVectorMayNotExist

Documented in scanVectorMayNotExist

scanVectorMayNotExist <- function(fileName) {
	if (!file.exists(fileName)) {
		warning(paste("Cannot find file '", fileName, "'", sep=""))
		return(vector())
	}

	############################
	# AS IN XHMM C++ CODE:
	# Instead of splitting by whitespace, use ONLY tab as delimiter (to allow for sample names with space in them):
	############################

	return(scan(fileName, what=list(a=""), sep="\t")$a)
}

Try the xhmmScripts package in your browser

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

xhmmScripts documentation built on May 2, 2019, 1:01 a.m.