R/smedian.sample.R

Defines functions smedian.sample

smedian.sample <-
function(pos, v)
{
	w<-v[pos[1]:pos[2]][!is.na(v[pos[1]:pos[2]])]
	return(median(sample(w,length(w),replace=T),na.rm=T))
}

Try the CNprep package in your browser

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

CNprep documentation built on May 24, 2022, 5:05 p.m.