R/reassignLabelsVec.R

Defines functions reassignLabelsVec

reassignLabelsVec <-
function (x)
{
	labels = unique (x)
	x.new = x

	nlabels = length (labels)
	for (i in 1:nlabels)
		x.new[which (x==labels[i])] = i

	return (x.new)
}

Try the DIRECT package in your browser

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

DIRECT documentation built on May 29, 2017, 10:59 a.m.