#' Title
#'
#' @param curve
#'
#' @return
#' @export
#'
#' @examples
get.first.valley <- function(curve){
# VER 3.4.1
# get valley --> valley1
if(is.null(valley1 <- get.valley(curve))) {
return(NULL)
} else {
# get peak to the left --> peak1
if(is.null(peak <- get.peak(curve[ 1:valley1 ])))
# -> no peak return valley1
return(valley1)
else {
# -> has peak get valley to the left
if(is.null(valley2 <- get.valley(curve[ 1:peak ])))
# -> no valley return valley1
return(valley1)
else
# -> has valley get first valley [1, peak]
return(get.first.valley(curve[1:peak]))
}
}
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.