R/RcppExports.R

# Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393

#' Peak detection
#' 
#' \code{detect_cpp} returns a numeric vector determining where switches
#' are located.
#' 
#' @param stat a numeric vector.
#' @param tol an integer.
#' 
#' @return The returned value is a numeric vector.
#' 
#' @export
#' 
detect_cpp <- function(stat, threshold) {
    .Call('simulate_detect_cpp', PACKAGE = 'simulate', stat, threshold)
}

#' Jumps
#' 
#' \code{jumps_from_map} returns a numeric vector determining where jumps
#' are located.
#' 
#' @param map a numeric vector.
#' @param lambda a numerical value specifying the parameter of the exponential
#' law.
#' 
#' @return The returned value is a numeric vector.
#' 
#' @export
#' 
jumps_from_map <- function(map, lambda) {
    .Call('simulate_jumps_from_map', PACKAGE = 'simulate', map, lambda)
}

#' Chunks
#' 
#' \code{ancestry_chunks} converts jumps to chunks.
#' 
#' @param jumps a numeric vector obtained with \code{jumps_from_map}.
#' 
#' @return The returned value is a logical vector.
#' 
#' @export
#' 
ancestry_chunks <- function(jumps) {
    .Call('simulate_ancestry_chunks', PACKAGE = 'simulate', jumps)
}

#' Convert haplotypes to genotypes
#' 
#' \code{haplo_to_geno} converts haplotypes to genotypes.
#' 
#' @param H a numerical matrix.
#' 
#' @return The returned value is a numerical matrix.
#' 
#' @export
#' 
haplo_to_geno <- function(H) {
    .Call('simulate_haplo_to_geno', PACKAGE = 'simulate', H)
}
keurcien/simulate documentation built on May 20, 2019, 3:32 p.m.