R/seqshift.R

## ==========================================
## shifting sequence
## function used by seqformat, option to='SRS'
## ===========================================

seqshift <- function (seq, nbshift) {
	seql <- length(seq)
	
	sseq <- c(rep(NA,(seql-nbshift)), seq[1:nbshift])

	return(sseq)
}

Try the TraMineR package in your browser

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

TraMineR documentation built on Jan. 9, 2024, 3:02 p.m.