R/pos2Nhits.R

Defines functions `pos2Nhits`

`pos2Nhits` <-
function(input,w=300L,l){
input<-input[input>=1L & input+w<=l]
lq=length(input)
Nhits<-rep.int(0L,l)
Nhits<-.C("pos2Nhits", pos =as.integer(input),lpos=as.integer(lq), Nhits=as.integer(Nhits),w=as.integer(w),l=as.integer(l), PACKAGE="CSAR" )$Nhits
rm(input,lq);gc(verbose=FALSE)
return(Nhits)
}

Try the CSAR package in your browser

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

CSAR documentation built on Nov. 8, 2020, 6:50 p.m.