#' Returns the index of element in vector
#'
#' @import tidyverse
#' @import dplyr
#' @param finals, vector of sums of squares for each explanatory variable correlation
#' @param element, element to be searched for
#' @return index of elementi n vector
#' @export
index <- function(finals, element) {
idx <- 1
for(i in finals) {
if(i == element) {
return(idx)
}
idx <- idx+1
}
return(-1)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.