R/seqgbar.R

Defines functions seqgbar

## ========================================================
## Creates a vector of 0 and 1 used for plotting a sequence
## ========================================================

seqgbar <- function(seq, statl, seql) {

	nbstat <- length(statl)
	
	gbar <- vector("integer", seql*nbstat)

	for (j in 1:seql)
		gbar[((j-1)*nbstat)+which(statl==seq[j])] <- 1

	return(gbar)
}
	

Try the PST package in your browser

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

PST documentation built on May 29, 2017, 5:16 p.m.