R/startId.R

Defines functions startId

Documented in startId

startId <-
function(n){
  if(n < 1) stop("n must be positive")
  if(n == 1) return(1)
  ans <- c(1, rep(0, (n-1)))
  for(i in 2:n) ans[i] <- ans[i-1] + (i-1)
  return(ans)
}

Try the synRNASeqNet package in your browser

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

synRNASeqNet documentation built on May 2, 2019, 6:01 a.m.