R/can_plink_version_and_data_can_work_together.R

Defines functions can_plink_version_and_data_can_work_together

Documented in can_plink_version_and_data_can_work_together

#' Determine if the `data` and the version of `PLINK`/`PLINK2` can work together
#' @inheritParams default_params_doc
#' @return \link{TRUE} if the `data` and the version
#' of `PLINK`/`PLINK2` can work together
#' @author Richèl J.C. Bilderbeek
#' @export
can_plink_version_and_data_can_work_together <- function( # nolint indeed a long function name
  data,
  plink_options,
  verbose = FALSE
) {
  plinkr::check_verbose(verbose)
  result <- FALSE
  tryCatch({
    plinkr::check_plink_version_and_data_can_work_together(
      data = data,
      plink_options = plink_options
    )
    result <- TRUE
  }, error = function(e) {
      if (verbose) message(e$message)
    }
  )
  result
}
richelbilderbeek/plinkr documentation built on March 25, 2024, 3:18 p.m.