Defines functions idxInvert

Documented in idxInvert

idxInvert <- function(m, idx) {
	if (class(m)=="numeric" | class(m)=="integer") {
		nNodes <- m
	} else {
		nNodes <- try(nrow(m), silent=TRUE)
		if (class(nNodes) == "try-error" | is.null(nNodes)) {
			cat("ERROR: argument 'm' must be a numeric OR an object on which nrow() can be performed.\n\n", geterrmessage())
	return(setdiff(1:(nNodes^2), idx))

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.