#' Calculate raw score for black hole and its related tests
#'
#' This function calculates raw scores for tests that are simlilar to the Black
#' Hole test. It actually calculated the proximity of the users' response
#' location to the real location.
#'
#' @param data Raw data of class \code{data.frame}.
#' @param ... Other input argument for future expansion.
#' @return The raw score calculated of \code{double} type.
#' @importFrom magrittr %>%
#' @export
meanprox <- function(data, ...) {
mean_dist <- data %>%
dplyr::pull("RespLocDist") %>%
purrr::map(~ strsplit(.x, "-")) %>%
unlist() %>%
as.numeric() %>%
mean()
10 - mean_dist
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.