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 Nov. 25, 2020, 3 p.m.