R/breaks.AP.R

Defines functions breaks.AP

Documented in breaks.AP

breaks.AP <-
function(posture)
{
	y <- posture
	n <- length(y)
	
	mmm <- length(y)
	one <- y[-mmm]
	two <- y[-1]
	
	# transitions from sed to not
	trans.up <- 
		(one=="0")&(two!="0")
	num.up.AP <- sum(trans.up,na.rm=T)
	if (num.up.AP==0)
		num.up.AP <- NA
	return(num.up.AP=num.up.AP)	
}

Try the activpalProcessing package in your browser

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

activpalProcessing documentation built on May 2, 2019, 2:17 a.m.