R/isolate.R

#if (!isGeneric("isolate")) {
setGeneric("isolate",
	function (x, ...)
		standardGeneric("isolate")
)
#}

setMethod("isolate",
	signature(x = "VegsoupPartition"),
	function (x, plot, ...) {
		if (is.character(plot)) {
			i <- match(plot, rownames(x))
			test <- any(is.na(i))
			if (test) {
				stop("plot identifier ", plot[is.na(i)], " not found", call. = FALSE)
			}
			k <- getK(x) + 1
			x@part[ i ] <- k
			x@k <- k
		}		
	return(x)
	}
)		

Try the vegsoup package in your browser

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

vegsoup documentation built on Feb. 24, 2021, 3 a.m.