R/reassignLabelsVec.R

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 Sept. 8, 2023, 5:45 p.m.