R/prodN2.R

Defines functions prodN2

Documented in prodN2

prodN2 <-
function(x,r,L1D,posD, typeD)
{
	aux<-(abs(posD-x) <=r)
	posDsel<-posD[aux]
	typeDsel<-typeD[aux]
	if (sum(posDsel)==0) {PL1Dx<-1}
	else	{PL1Dx<-prod(L1D[cbind(ceiling(posDsel), typeDsel)],na.rm=TRUE)}

	return(PL1Dx)	
}

Try the IndTestPP package in your browser

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

IndTestPP documentation built on Aug. 29, 2020, 1:06 a.m.