R/conservation_first.R

Defines functions conservation_first

Documented in conservation_first

conservation_first <-
function(modal, p,seqlength){
	first <- 0
	second <- 0
	third <- 0
	i <- 1
	while(i <= seqlength){
		if(modal[i] >= p){
			first = first + 1
		}
		if(modal[i+1] >= p){
			second = second + 1
		}
		if(modal[i+2] >= p){
			third = third + 1
		}
		i = i+3
	}
	combined <- rbind(first,second,third)
	return(combined)
}

Try the VLF package in your browser

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

VLF documentation built on May 1, 2019, 10:20 p.m.