[R/calc_K.R:2:1:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/calc_K.R#L2) *style:* **Lines should not be more than 80 characters.**
```r
#' @description Calculate the average number of junctions after an infinite number of generations, provided information on the initial heterozygosity, population size and the number of generations.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/calc_K.R:6:1:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/calc_K.R#L6) *style:* **Lines should not be more than 80 characters.**
```r
#' @param C Mean number of crossovers per meiosis (e.g. size in Morgan of the chromosome)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/calc_K.R:11:20:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/calc_K.R#L11) *style:* **Variable or function name should be snake_case.**
```r
calc_k <- function(N = Inf,
                   ^
```
[R/calc_K.R:12:20:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/calc_K.R#L12) *style:* **Variable or function name should be snake_case.**
```r
                   R = Inf,
                   ^
```
[R/calc_K.R:13:20:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/calc_K.R#L13) *style:* **Variable or function name should be snake_case.**
```r
                   H_0 = 0.5,
                   ^~~
```
[R/calc_K.R:16:3:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/calc_K.R#L16) *style:* **Variable or function name should be snake_case.**
```r
  K <- H_0 * C * 2 * N * R / (2 * N * C + R)
  ^
```
[R/calc_K.R:19:5:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/calc_K.R#L19) *style:* **Variable or function name should be snake_case.**
```r
    K <- H_0 * R
    ^
```
[R/calc_K.R:23:5:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/calc_K.R#L23) *style:* **Variable or function name should be snake_case.**
```r
    K <- H_0 * C * 2 * N
    ^
```
[R/calc_K.R:27:5:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/calc_K.R#L27) *style:* **Variable or function name should be snake_case.**
```r
    K <- Inf
    ^
```
[R/calculate_error.R:2:1:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/calculate_error.R#L2) *style:* **Lines should not be more than 80 characters.**
```r
#' @description Calculate the error in the estimate of the onset of hybridisation, following Equations 3 & 4 in the Supplementary information of Janzen et al. 2018.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/calculate_error.R:7:1:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/calculate_error.R#L7) *style:* **Lines should not be more than 80 characters.**
```r
#' @param C Mean number of crossovers per meiosis (e.g. size in Morgan of the chromosome)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/calculate_error.R:9:1:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/calculate_error.R#L9) *style:* **Lines should not be more than 80 characters.**
```r
#' @param relative Boolean flag, if TRUE: return the relative error, if FALSE: return error in generations
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/calculate_error.R:15:24:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/calculate_error.R#L15) *style:* **Variable or function name should be snake_case.**
```r
time_error <- function(J = NA,
                       ^
```
[R/calculate_error.R:16:24:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/calculate_error.R#L16) *style:* **Variable or function name should be snake_case.**
```r
                       N = Inf,
                       ^
```
[R/calculate_error.R:17:24:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/calculate_error.R#L17) *style:* **Variable or function name should be snake_case.**
```r
                       R = Inf,
                       ^
```
[R/calculate_error.R:18:24:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/calculate_error.R#L18) *style:* **Variable or function name should be snake_case.**
```r
                       H_0 = 0.5,
                       ^~~
```
[R/calculate_error.R:24:3:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/calculate_error.R#L24) *style:* **Variable or function name should be snake_case.**
```r
  K <- junctions::calc_k(N, R, H_0, C)
  ^
```
[R/calculate_error.R:30:7:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/calculate_error.R#L30) *style:* **Do not place spaces around code in parentheses or square brackets.**
```r
  if ( relative) return(  error)
      ^
```
[R/calculate_error.R:30:25:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/calculate_error.R#L30) *style:* **Do not place spaces around code in parentheses or square brackets.**
```r
  if ( relative) return(  error)
                        ^
```
[R/calculate_error.R:31:26:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/calculate_error.R#L31) *style:* **Put spaces around all infix operators.**
```r
  if (!relative) return(t*error)
                        ~^~
```
[R/calculate_MAT.R:2:1:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/calculate_MAT.R#L2) *style:* **Lines should not be more than 80 characters.**
```r
#' @description Function that calculates the maximum time after hybridization after which the number of junctions can still be reliably used to estimate the onset of hybridization. This is following equation 15 in Janzen et al. 2018.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/calculate_MAT.R:6:1:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/calculate_MAT.R#L6) *style:* **Lines should not be more than 80 characters.**
```r
#' @param C Mean number of crossovers per meiosis (e.g. size in Morgan of the chromosome)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/calculate_MAT.R:12:27:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/calculate_MAT.R#L12) *style:* **Variable or function name should be snake_case.**
```r
calculate_mat <- function(N = Inf,
                          ^
```
[R/calculate_MAT.R:13:27:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/calculate_MAT.R#L13) *style:* **Variable or function name should be snake_case.**
```r
                          R = Inf,
                          ^
```
[R/calculate_MAT.R:14:27:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/calculate_MAT.R#L14) *style:* **Variable or function name should be snake_case.**
```r
                          H_0 = 0.5,
                          ^~~
```
[R/calculate_MAT.R:20:3:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/calculate_MAT.R#L20) *style:* **Variable or function name should be snake_case.**
```r
  K <- junctions::calc_k(N, R, H_0, C)
  ^
```
[R/calculate_time.R:1:1:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/calculate_time.R#L1) *style:* **Lines should not be more than 80 characters.**
```r
#' Estimate the time since the onset of hybridization, using the number of junctions
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/calculate_time.R:2:1:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/calculate_time.R#L2) *style:* **Lines should not be more than 80 characters.**
```r
#' @description Estimate the time since the onset of hybridization, following equation 14 in Janzen et al. 2018
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/calculate_time.R:7:1:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/calculate_time.R#L7) *style:* **Lines should not be more than 80 characters.**
```r
#' @param C Mean number of crossovers per meiosis (e.g. size in Morgan of the chromosome)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/calculate_time.R:11:1:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/calculate_time.R#L11) *style:* **Lines should not be more than 80 characters.**
```r
#' estimate_time(J = J, N = 100, R = 1000, H_0 = 0.5, C = 1)  # should be 200 again
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/calculate_time.R:13:27:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/calculate_time.R#L13) *style:* **Variable or function name should be snake_case.**
```r
estimate_time <- function(J = NA,
                          ^
```
[R/calculate_time.R:14:27:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/calculate_time.R#L14) *style:* **Variable or function name should be snake_case.**
```r
                          N = Inf,
                          ^
```
[R/calculate_time.R:15:27:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/calculate_time.R#L15) *style:* **Variable or function name should be snake_case.**
```r
                          R = Inf,
                          ^
```
[R/calculate_time.R:16:27:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/calculate_time.R#L16) *style:* **Variable or function name should be snake_case.**
```r
                          H_0 = 0.5,
                          ^~~
```
[R/calculate_time.R:28:3:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/calculate_time.R#L28) *style:* **Variable or function name should be snake_case.**
```r
  K <- junctions::calc_k(N, R, H_0, C)
  ^
```
[R/estimate_time_markers.R:1:1:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/estimate_time_markers.R#L1) *style:* **Lines should not be more than 80 characters.**
```r
#' Estimate the time since the onset of hybridization, using the observed number of junctions, taking into account the distribution of markers
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/estimate_time_markers.R:2:1:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/estimate_time_markers.R#L2) *style:* **Lines should not be more than 80 characters.**
```r
#' @description Estimate the time since the onset of hybridization, following equation 1 in Janzen et al. unpublished
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/estimate_time_markers.R:6:1:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/estimate_time_markers.R#L6) *style:* **Lines should not be more than 80 characters.**
```r
#' @param marker_distribution A vector containing the position of all markers in Morgan.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/estimate_time_markers.R:10:1:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/estimate_time_markers.R#L10) *style:* **Lines should not be more than 80 characters.**
```r
#' J <- number_of_junctions_markers(N = 100, H_0 = 0.5, t = 200, marker_distribution = markers)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/estimate_time_markers.R:16:35:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/estimate_time_markers.R#L16) *style:* **Variable or function name should be snake_case.**
```r
estimate_time_markers <- function(J = NA,
                                  ^
```
[R/estimate_time_markers.R:17:35:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/estimate_time_markers.R#L17) *style:* **Variable or function name should be snake_case.**
```r
                                  N = Inf,
                                  ^
```
[R/estimate_time_markers.R:18:35:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/estimate_time_markers.R#L18) *style:* **Variable or function name should be snake_case.**
```r
                                  H_0 = 0.5,
                                  ^~~
```
[R/estimate_time_markers.R:31:5:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/estimate_time_markers.R#L31) *style:* **Place a space before left parenthesis, except in a function call.**
```r
  if(J > 1e4) {
    ^
```
[R/estimate_time_markers.R:35:63:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/estimate_time_markers.R#L35) *style:* **Do not place spaces around code in parentheses or square brackets.**
```r
  fitted <- stats::optimize(to_fit, interval = c(2, upper_lim) )
                                                              ^
```
[R/estimate_time_unphased.R:2:1:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/estimate_time_unphased.R#L2) *style:* **Lines should not be more than 80 characters.**
```r
#' @description Calculates the time since admixture, given unphased ancestry data.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/estimate_time_unphased.R:3:1:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/estimate_time_unphased.R#L3) *style:* **Lines should not be more than 80 characters.**
```r
#' @param local_anc Local_anc can be provided as either matrix with two columns, where the first column represents ancestry on chromosome 1, and the second column represents ancestry on chromosome 2. Ancestry labels used should be [0, 1], where 0 indicates the first ancestor, and 1 indicates the second ancestor. Alternatively, the user can provide a vector indicating whether at the specific marker, the focal individual is homozygous for the first ancestor (0), homozygous for the second ancestor (1) or heterozygous (2).
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/estimate_time_unphased.R:7:1:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/estimate_time_unphased.R#L7) *style:* **Lines should not be more than 80 characters.**
```r
#' @param max_t maximum time to be considered for maximum likelihood optimization. Too large values might cause the maximum likelihood algorithm to deviate from the global maximum.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/estimate_time_unphased.R:8:1:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/estimate_time_unphased.R#L8) *style:* **Lines should not be more than 80 characters.**
```r
#' @param optim_pop_size If TRUE, population size is also optimized. Starting point of the optimizaton will then be on the given population size, and half the maximum time.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/estimate_time_unphased.R:21:19:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/estimate_time_unphased.R#L21) *warning:* **no visible global function definition for ‘get_states’**
```r
  local_states <- get_states(local_anc)
                  ^~~~~~~~~~
```
[R/estimate_time_unphased.R:27:21:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/estimate_time_unphased.R#L27) *warning:* **no visible global function definition for ‘single_state’**
```r
    seven_states <- single_state(local_time, N = pop_size, d = di)
                    ^~~~~~~~~~~~
```
[R/estimate_time_unphased.R:34:5:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/estimate_time_unphased.R#L34) *style:* **Place a space before left parenthesis, except in a function call.**
```r
  if(optim_pop_size == FALSE) {
    ^
```
[R/estimate_time_unphased.R:41:9:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/estimate_time_unphased.R#L41) *style:* **Place a space before left parenthesis, except in a function call.**
```r
      if(verbose) cat(t, -sum(local_probs), "\n")
        ^
```
[R/estimate_time_unphased.R:48:9:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/estimate_time_unphased.R#L48) *style:* **Place a space before left parenthesis, except in a function call.**
```r
      if(params[[1]] < 2) return(-Inf)
        ^
```
[R/estimate_time_unphased.R:49:9:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/estimate_time_unphased.R#L49) *style:* **Place a space before left parenthesis, except in a function call.**
```r
      if(params[[2]] < 2) return(-Inf)
        ^
```
[R/estimate_time_unphased.R:55:9:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/estimate_time_unphased.R#L55) *style:* **Place a space before left parenthesis, except in a function call.**
```r
      if(verbose) cat("N",params[[1]],"t", params[[2]], -sum(local_probs), "\n")
        ^
```
[R/estimate_time_unphased.R:55:27:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/estimate_time_unphased.R#L55) *style:* **Commas should always have a space after.**
```r
      if(verbose) cat("N",params[[1]],"t", params[[2]], -sum(local_probs), "\n")
                          ^
```
[R/estimate_time_unphased.R:55:39:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/estimate_time_unphased.R#L55) *style:* **Commas should always have a space after.**
```r
      if(verbose) cat("N",params[[1]],"t", params[[2]], -sum(local_probs), "\n")
                                      ^
```
[R/number_of_junctions_backcross.R:2:1:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/number_of_junctions_backcross.R#L2) *style:* **Lines should not be more than 80 characters.**
```r
#' @description Calculate the expected number of junctions after t generations, in a backcrossing mating scheme.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/number_of_junctions_backcross.R:4:1:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/number_of_junctions_backcross.R#L4) *style:* **Lines should not be more than 80 characters.**
```r
#' @param C Mean number of crossovers per meiosis (e.g. size in Morgan of the chromosome)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/number_of_junctions_backcross.R:10:43:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/number_of_junctions_backcross.R#L10) *style:* **Variable or function name should be snake_case.**
```r
number_of_junctions_backcross <- function(H_0 = 0.5,
                                          ^~~
```
[R/number_of_junctions_backcross.R:13:29:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/number_of_junctions_backcross.R#L13) *style:* **Place a space before left parenthesis, except in a function call.**
```r
  jt <- 2 * H_0 * t * C * 2^(-t)
                            ^
```
[R/number_of_junctions_di.R:2:1:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/number_of_junctions_di.R#L2) *style:* **Lines should not be more than 80 characters.**
```r
#' Calculate the expected number of junctions between two markers separated by a given amount of recombination
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/number_of_junctions_di.R:3:1:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/number_of_junctions_di.R#L3) *style:* **Lines should not be more than 80 characters.**
```r
#' @description Calculate the expected number of junctions after t generations, provided information on the initial heterozygosity, population size, the number of generations since the onset of admixture and the distance between two markers.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/number_of_junctions_di.R:12:36:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/number_of_junctions_di.R#L12) *style:* **Variable or function name should be snake_case.**
```r
number_of_junctions_di <- function(N = Inf,
                                   ^
```
[R/number_of_junctions_di.R:13:36:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/number_of_junctions_di.R#L13) *style:* **Variable or function name should be snake_case.**
```r
                                   H_0 = 0.5,
                                   ^~~
```
[R/number_of_junctions_di.R:17:5:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/number_of_junctions_di.R#L17) *style:* **Place a space before left parenthesis, except in a function call.**
```r
  if(is.infinite(N)) local_k <- H_0
    ^
```
[R/number_of_junctions_di.R:19:45:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/number_of_junctions_di.R#L19) *style:* **Put spaces around all infix operators.**
```r
  local_j <- local_k - local_k * (1 - 1 / (2*N) - di)^t
                                           ~^~
```
[R/number_of_junctions_markers.R:1:1:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/number_of_junctions_markers.R#L1) *style:* **Lines should not be more than 80 characters.**
```r
#' Calculate the expected total number of junctions in a chromosome, given the distribution of markers
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/number_of_junctions_markers.R:2:1:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/number_of_junctions_markers.R#L2) *style:* **Lines should not be more than 80 characters.**
```r
#' @description Calculate the expected number of junctions after t generations, provided information on the initial heterozygosity, population size, the number of generations since the onset of admixture and the distribution of markers.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/number_of_junctions_markers.R:6:1:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/number_of_junctions_markers.R#L6) *style:* **Lines should not be more than 80 characters.**
```r
#' @param marker_distribution A vector containing the position of all markers in Morgan.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/number_of_junctions_markers.R:20:41:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/number_of_junctions_markers.R#L20) *style:* **Variable or function name should be snake_case.**
```r
number_of_junctions_markers <- function(N = Inf,
                                        ^
```
[R/number_of_junctions_markers.R:21:41:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/number_of_junctions_markers.R#L21) *style:* **Variable or function name should be snake_case.**
```r
                                        H_0 = 0.5,
                                        ^~~
```
[R/number_of_junctions_markers.R:25:5:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/number_of_junctions_markers.R#L25) *style:* **Place a space before left parenthesis, except in a function call.**
```r
  if(length(marker_distribution) < 2) {
    ^
```
[R/number_of_junctions_markers.R:30:6:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/number_of_junctions_markers.R#L30) *style:* **Place a space before left parenthesis, except in a function call.**
```r
  for(i in 2:length(marker_distribution)) {
     ^
```
[R/number_of_junctions_markers.R:31:57:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/number_of_junctions_markers.R#L31) *style:* **Put spaces around all infix operators.**
```r
    di <- marker_distribution[i] - marker_distribution[i-1]
                                                       ~^~
```
[R/number_of_junctions_markers.R:32:27:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/number_of_junctions_markers.R#L32) *warning:* **no visible global function definition for ‘number_of_junctions_di’**
```r
    expected_junctions <- number_of_junctions_di(N, H_0, t, di)
                          ^~~~~~~~~~~~~~~~~~~~~~
```
[R/number_of_junctions.R:2:1:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/number_of_junctions.R#L2) *style:* **Lines should not be more than 80 characters.**
```r
#' @description Calculate the average number of junctions after t generations, provided information on the initial heterozygosity, population size and the number of generations.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/number_of_junctions.R:6:1:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/number_of_junctions.R#L6) *style:* **Lines should not be more than 80 characters.**
```r
#' @param C Mean number of crossovers per meiosis (e.g. size in Morgan of the chromosome)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/number_of_junctions.R:13:33:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/number_of_junctions.R#L13) *style:* **Variable or function name should be snake_case.**
```r
number_of_junctions <- function(N = Inf,
                                ^
```
[R/number_of_junctions.R:14:33:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/number_of_junctions.R#L14) *style:* **Variable or function name should be snake_case.**
```r
                                R = Inf,
                                ^
```
[R/number_of_junctions.R:15:33:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/number_of_junctions.R#L15) *style:* **Variable or function name should be snake_case.**
```r
                                H_0 = 0.5,
                                ^~~
```
[R/number_of_junctions.R:28:3:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/number_of_junctions.R#L28) *style:* **Variable or function name should be snake_case.**
```r
  K <- junctions::calc_k(N, R, H_0, C)
  ^
```
[R/RcppExports.R:4:1:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/RcppExports.R#L4) *style:* **Lines should not be more than 80 characters.**
```r
simulate_backcrossing_cpp <- function(pop_size, freq_ancestor_1, total_runtime, size_in_morgan, number_of_markers, time_points, seed) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/RcppExports.R:5:1:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/RcppExports.R#L5) *style:* **Lines should not be more than 80 characters.**
```r
    .Call('_junctions_simulate_backcrossing_cpp', PACKAGE = 'junctions', pop_size, freq_ancestor_1, total_runtime, size_in_morgan, number_of_markers, time_points, seed)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/RcppExports.R:5:11:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/RcppExports.R#L5) *style:* **Only use double-quotes.**
```r
    .Call('_junctions_simulate_backcrossing_cpp', PACKAGE = 'junctions', pop_size, freq_ancestor_1, total_runtime, size_in_morgan, number_of_markers, time_points, seed)
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/RcppExports.R:5:61:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/RcppExports.R#L5) *style:* **Only use double-quotes.**
```r
    .Call('_junctions_simulate_backcrossing_cpp', PACKAGE = 'junctions', pop_size, freq_ancestor_1, total_runtime, size_in_morgan, number_of_markers, time_points, seed)
                                                            ^~~~~~~~~~~
```
[R/RcppExports.R:8:1:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/RcppExports.R#L8) *style:* **Lines should not be more than 80 characters.**
```r
sim_fin_chrom <- function(pop_size, freq_ancestor_1, run_time, size_in_Morgan, seed, R) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/RcppExports.R:8:64:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/RcppExports.R#L8) *style:* **Variable or function name should be snake_case.**
```r
sim_fin_chrom <- function(pop_size, freq_ancestor_1, run_time, size_in_Morgan, seed, R) {
                                                               ^~~~~~~~~~~~~~
```
[R/RcppExports.R:8:86:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/RcppExports.R#L8) *style:* **Variable or function name should be snake_case.**
```r
sim_fin_chrom <- function(pop_size, freq_ancestor_1, run_time, size_in_Morgan, seed, R) {
                                                                                ^
```
[R/RcppExports.R:9:1:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/RcppExports.R#L9) *style:* **Lines should not be more than 80 characters.**
```r
    .Call('_junctions_sim_fin_chrom', PACKAGE = 'junctions', pop_size, freq_ancestor_1, run_time, size_in_Morgan, seed, R)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/RcppExports.R:9:11:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/RcppExports.R#L9) *style:* **Only use double-quotes.**
```r
    .Call('_junctions_sim_fin_chrom', PACKAGE = 'junctions', pop_size, freq_ancestor_1, run_time, size_in_Morgan, seed, R)
          ^~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/RcppExports.R:9:49:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/RcppExports.R#L9) *style:* **Only use double-quotes.**
```r
    .Call('_junctions_sim_fin_chrom', PACKAGE = 'junctions', pop_size, freq_ancestor_1, run_time, size_in_Morgan, seed, R)
                                                ^~~~~~~~~~~
```
[R/RcppExports.R:12:1:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/RcppExports.R#L12) *style:* **Lines should not be more than 80 characters.**
```r
sim_inf_chrom <- function(pop_size, freq_ancestor_1, run_time, size_in_Morgan, markers, seed) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/RcppExports.R:12:64:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/RcppExports.R#L12) *style:* **Variable or function name should be snake_case.**
```r
sim_inf_chrom <- function(pop_size, freq_ancestor_1, run_time, size_in_Morgan, markers, seed) {
                                                               ^~~~~~~~~~~~~~
```
[R/RcppExports.R:13:1:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/RcppExports.R#L13) *style:* **Lines should not be more than 80 characters.**
```r
    .Call('_junctions_sim_inf_chrom', PACKAGE = 'junctions', pop_size, freq_ancestor_1, run_time, size_in_Morgan, markers, seed)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/RcppExports.R:13:11:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/RcppExports.R#L13) *style:* **Only use double-quotes.**
```r
    .Call('_junctions_sim_inf_chrom', PACKAGE = 'junctions', pop_size, freq_ancestor_1, run_time, size_in_Morgan, markers, seed)
          ^~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/RcppExports.R:13:49:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/RcppExports.R#L13) *style:* **Only use double-quotes.**
```r
    .Call('_junctions_sim_inf_chrom', PACKAGE = 'junctions', pop_size, freq_ancestor_1, run_time, size_in_Morgan, markers, seed)
                                                ^~~~~~~~~~~
```
[R/RcppExports.R:16:1:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/RcppExports.R#L16) *style:* **Lines should not be more than 80 characters.**
```r
sim_phased_unphased_cpp <- function(pop_size, freq_ancestor_1, total_runtime, size_in_morgan, number_of_markers, time_points, seed) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/RcppExports.R:17:1:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/RcppExports.R#L17) *style:* **Lines should not be more than 80 characters.**
```r
    .Call('_junctions_sim_phased_unphased_cpp', PACKAGE = 'junctions', pop_size, freq_ancestor_1, total_runtime, size_in_morgan, number_of_markers, time_points, seed)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/RcppExports.R:17:11:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/RcppExports.R#L17) *style:* **Only use double-quotes.**
```r
    .Call('_junctions_sim_phased_unphased_cpp', PACKAGE = 'junctions', pop_size, freq_ancestor_1, total_runtime, size_in_morgan, number_of_markers, time_points, seed)
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/RcppExports.R:17:59:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/RcppExports.R#L17) *style:* **Only use double-quotes.**
```r
    .Call('_junctions_sim_phased_unphased_cpp', PACKAGE = 'junctions', pop_size, freq_ancestor_1, total_runtime, size_in_morgan, number_of_markers, time_points, seed)
                                                          ^~~~~~~~~~~
```
[R/RcppExports.R:19:1:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/RcppExports.R#L19) *style:* **Trailing blank lines are superfluous.**
```r

^
```
[R/sim_backcrossing.R:7:1:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/sim_backcrossing.R#L7) *style:* **Lines should not be more than 80 characters.**
```r
#' @param size_in_morgan Mean number of crossovers per meiosis (e.g. size in Morgan of the chromosome)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/sim_backcrossing.R:11:1:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/sim_backcrossing.R#L11) *style:* **Lines should not be more than 80 characters.**
```r
#' recorded to be returned at the end of the simulation. If left at -1, ancestry is recorded at every generation (computationally heavy).
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/sim_backcrossing.R:12:1:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/sim_backcrossing.R#L12) *style:* **Lines should not be more than 80 characters.**
```r
#' @return List with five entries: average_junctions: average number of junctions over time, detected_junctions: average number of detected junctions, given the markers. markers: vector with the locations of the molecular markers, junction_distribution: distribution of junctions per time step average_heterozygosity: average heterozygosity.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/sim_backcrossing.R:26:5:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/sim_backcrossing.R#L26) *style:* **Place a space before left parenthesis, except in a function call.**
```r
  if(length(time_points) == 1) {
    ^
```
[R/sim_backcrossing.R:27:7:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/sim_backcrossing.R#L27) *style:* **Place a space before left parenthesis, except in a function call.**
```r
    if(time_points == -1) {
      ^
```
[R/sim_fin_chrom.R:2:1:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/sim_fin_chrom.R#L2) *style:* **Lines should not be more than 80 characters.**
```r
#' @description Individual based simulation of the accumulation of junctions for a chromosome with regularly distributed markers.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/sim_fin_chrom.R:5:1:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/sim_fin_chrom.R#L5) *style:* **Lines should not be more than 80 characters.**
```r
#' @param morgan Mean number of crossovers per meiosis (e.g. size in Morgan of the chromosome)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/sim_fin_chrom.R:9:1:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/sim_fin_chrom.R#L9) *style:* **Lines should not be more than 80 characters.**
```r
#' @return \item{avgJunctions}{vector of the average number of junctions at time = [0, total_runtime]}
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/sim_fin_chrom.R:17:27:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/sim_fin_chrom.R#L17) *style:* **Remove spaces before the left parenthesis in a function call.**
```r
sim_fin_chrom <- function (pop_size = 100,
                          ^
```
[R/sim_fin_chrom.R:22:28:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/sim_fin_chrom.R#L22) *style:* **Variable or function name should be snake_case.**
```r
                           R = 100) {
                           ^
```
[R/sim_inf_chrom.R:2:1:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/sim_inf_chrom.R#L2) *style:* **Lines should not be more than 80 characters.**
```r
#' @description Individual based simulation of the accumulation of junctions for a chromosome with an infinite number of recombination sites.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/sim_inf_chrom.R:6:1:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/sim_inf_chrom.R#L6) *style:* **Lines should not be more than 80 characters.**
```r
#' @param morgan Mean number of crossovers per meiosis (e.g. size in Morgan of the chromosome)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/sim_inf_chrom.R:7:1:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/sim_inf_chrom.R#L7) *style:* **Lines should not be more than 80 characters.**
```r
#' @param markers The number of genetic markers superimposed on the chromosome. If markers is set to -1, no markers are superimposed (faster simulation)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/sim_inf_chrom.R:9:1:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/sim_inf_chrom.R#L9) *style:* **Lines should not be more than 80 characters.**
```r
#' @return \item{avgJunctions}{vector of the average number of junctions at time = [0, total_runtime]}
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/sim_phased_unphased.R:2:1:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/sim_phased_unphased.R#L2) *style:* **Lines should not be more than 80 characters.**
```r
#' @description Individual based simulation of the accumulation of junctions, returning phased and unphased data. Ancestry on both chromosomes of 10 randomly sampled individuals per generations is returned.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/sim_phased_unphased.R:6:1:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/sim_phased_unphased.R#L6) *style:* **Lines should not be more than 80 characters.**
```r
#' @param size_in_morgan Mean number of crossovers per meiosis (e.g. size in Morgan of the chromosome)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/sim_phased_unphased.R:7:1:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/sim_phased_unphased.R#L7) *style:* **Lines should not be more than 80 characters.**
```r
#' @param number_of_markers The number of genetic markers superimposed on the chromosome.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/sim_phased_unphased.R:8:1:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/sim_phased_unphased.R#L8) *style:* **Lines should not be more than 80 characters.**
```r
#' @param time_points vector with time points at which local ancestry has to be recorded to be returned at the end of the simulation. If left at -1, ancestry is recorded at every generation (computationally heavy).
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/sim_phased_unphased.R:10:1:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/sim_phased_unphased.R#L10) *style:* **Lines should not be more than 80 characters.**
```r
#' @return matrix with five columns: [time, individual, marker location, ancestry chromosome 1, ancestry chromosome 2]
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/sim_phased_unphased.R:24:5:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/sim_phased_unphased.R#L24) *style:* **Place a space before left parenthesis, except in a function call.**
```r
  if(length(time_points) == 1) {
    ^
```
[R/sim_phased_unphased.R:25:7:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/sim_phased_unphased.R#L25) *style:* **Place a space before left parenthesis, except in a function call.**
```r
    if(time_points == -1) {
      ^
```
[R/unphased_log_likelihood.R:2:1:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/unphased_log_likelihood.R#L2) *style:* **Lines should not be more than 80 characters.**
```r
#' @description Calculates the log likelihood of observing the unphased data, given the population size, initial heterozygosity and time since admixture
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/unphased_log_likelihood.R:3:1:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/unphased_log_likelihood.R#L3) *style:* **Lines should not be more than 80 characters.**
```r
#' @param local_anc Local_anc can be provided as either matrix with two columns, where the first column represents ancestry on chromosome 1, and the second column represents ancestry on chromosome 2. Ancestry labels used should be [0, 1], where 0 indicates the first ancestor, and 1 indicates the second ancestor. Alternatively, the user can provide a vector indicating whether at the specific marker, the focal individual is homozygous for the first ancestor (0), homozygous for the second ancestor (1) or heterozygous (2).
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/unphased_log_likelihood.R:18:19:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/unphased_log_likelihood.R#L18) *warning:* **no visible global function definition for ‘get_states’**
```r
  local_states <- get_states(local_anc)
                  ^~~~~~~~~~
```
[R/unphased_log_likelihood.R:24:21:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/unphased_log_likelihood.R#L24) *warning:* **no visible global function definition for ‘single_state’**
```r
    seven_states <- single_state(t = local_time, N = local_pop_size, d = di)
                    ^~~~~~~~~~~~
```
[R/unphased_log_likelihood.R:31:5:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/unphased_log_likelihood.R#L31) *style:* **Place a space before left parenthesis, except in a function call.**
```r
  if(length(t) == 1) {
    ^
```
[R/unphased_log_likelihood.R:42:5:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/unphased_log_likelihood.R#L42) *style:* **Place a space before left parenthesis, except in a function call.**
```r
  if(length(t) > 1) {
    ^
```
[R/unphased_log_likelihood.R:44:8:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/unphased_log_likelihood.R#L44) *style:* **Place a space before left parenthesis, except in a function call.**
```r
    for(i in seq_along(t)) {
       ^
```
[R/util.R:12:5:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/util.R#L12) *style:* **Place a space before left parenthesis, except in a function call.**
```r
  if(is.matrix(local_anc_matrix)) {
    ^
```
[R/util.R:13:50:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/util.R#L13) *style:* **Commas should always have a space after.**
```r
    local_anc <- rep(2, length(local_anc_matrix[,1]))
                                                 ^
```
[R/util.R:14:39:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/util.R#L14) *style:* **Commas should always have a space after.**
```r
    homo_0 <- which(local_anc_matrix[,1] == 0 &
                                      ^
```
[R/util.R:15:42:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/util.R#L15) *style:* **Commas should always have a space after.**
```r
                      (local_anc_matrix[,1] == local_anc_matrix[,2]))
                                         ^
```
[R/util.R:15:66:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/util.R#L15) *style:* **Commas should always have a space after.**
```r
                      (local_anc_matrix[,1] == local_anc_matrix[,2]))
                                                                 ^
```
[R/util.R:16:39:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/util.R#L16) *style:* **Commas should always have a space after.**
```r
    homo_1 <- which(local_anc_matrix[,1] == 1 &
                                      ^
```
[R/util.R:17:42:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/util.R#L17) *style:* **Commas should always have a space after.**
```r
                      (local_anc_matrix[,1] == local_anc_matrix[,2]))
                                         ^
```
[R/util.R:17:66:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/util.R#L17) *style:* **Commas should always have a space after.**
```r
                      (local_anc_matrix[,1] == local_anc_matrix[,2]))
                                                                 ^
```
[R/util.R:22:10:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/util.R#L22) *style:* **Do not place spaces around code in parentheses or square brackets.**
```r
  return( get_states_vector(local_anc))
         ^
```
[R/util.R:22:11:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/util.R#L22) *warning:* **no visible global function definition for ‘get_states_vector’**
```r
  return( get_states_vector(local_anc))
          ^~~~~~~~~~~~~~~~~
```
[R/util.R:28:6:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/util.R#L28) *style:* **Place a space before left parenthesis, except in a function call.**
```r
  for(i in 2:length(local_anc)) {
     ^
```
[R/util.R:29:24:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/util.R#L29) *style:* **Put spaces around all infix operators.**
```r
    left <- local_anc[i-1]
                      ~^~
```
[R/util.R:32:7:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/util.R#L32) *style:* **Place a space before left parenthesis, except in a function call.**
```r
    if(left == 0 && right == 1) all_states[i-1] <- 1
      ^
```
[R/util.R:32:45:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/util.R#L32) *style:* **Put spaces around all infix operators.**
```r
    if(left == 0 && right == 1) all_states[i-1] <- 1
                                           ~^~
```
[R/util.R:33:7:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/util.R#L33) *style:* **Place a space before left parenthesis, except in a function call.**
```r
    if(left == 1 && right == 0) all_states[i-1] <- 2
      ^
```
[R/util.R:33:45:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/util.R#L33) *style:* **Put spaces around all infix operators.**
```r
    if(left == 1 && right == 0) all_states[i-1] <- 2
                                           ~^~
```
[R/util.R:34:7:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/util.R#L34) *style:* **Place a space before left parenthesis, except in a function call.**
```r
    if(left == 1 && right == 1) all_states[i-1] <- 3
      ^
```
[R/util.R:34:45:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/util.R#L34) *style:* **Put spaces around all infix operators.**
```r
    if(left == 1 && right == 1) all_states[i-1] <- 3
                                           ~^~
```
[R/util.R:35:7:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/util.R#L35) *style:* **Place a space before left parenthesis, except in a function call.**
```r
    if(left == 0 && right == 0) all_states[i-1] <- 4
      ^
```
[R/util.R:35:45:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/util.R#L35) *style:* **Put spaces around all infix operators.**
```r
    if(left == 0 && right == 0) all_states[i-1] <- 4
                                           ~^~
```
[R/util.R:36:7:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/util.R#L36) *style:* **Place a space before left parenthesis, except in a function call.**
```r
    if(left == 2 && right == 1) all_states[i-1] <- 5
      ^
```
[R/util.R:36:45:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/util.R#L36) *style:* **Put spaces around all infix operators.**
```r
    if(left == 2 && right == 1) all_states[i-1] <- 5
                                           ~^~
```
[R/util.R:37:7:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/util.R#L37) *style:* **Place a space before left parenthesis, except in a function call.**
```r
    if(left == 2 && right == 0) all_states[i-1] <- 6
      ^
```
[R/util.R:37:45:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/util.R#L37) *style:* **Put spaces around all infix operators.**
```r
    if(left == 2 && right == 0) all_states[i-1] <- 6
                                           ~^~
```
[R/util.R:38:7:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/util.R#L38) *style:* **Place a space before left parenthesis, except in a function call.**
```r
    if(left == 0 && right == 2) all_states[i-1] <- 7
      ^
```
[R/util.R:38:45:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/util.R#L38) *style:* **Put spaces around all infix operators.**
```r
    if(left == 0 && right == 2) all_states[i-1] <- 7
                                           ~^~
```
[R/util.R:39:7:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/util.R#L39) *style:* **Place a space before left parenthesis, except in a function call.**
```r
    if(left == 1 && right == 2) all_states[i-1] <- 8
      ^
```
[R/util.R:39:45:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/util.R#L39) *style:* **Put spaces around all infix operators.**
```r
    if(left == 1 && right == 2) all_states[i-1] <- 8
                                           ~^~
```
[R/util.R:40:7:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/util.R#L40) *style:* **Place a space before left parenthesis, except in a function call.**
```r
    if(left == 2 && right == 2) all_states[i-1] <- 9
      ^
```
[R/util.R:40:45:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/util.R#L40) *style:* **Put spaces around all infix operators.**
```r
    if(left == 2 && right == 2) all_states[i-1] <- 9
                                           ~^~
```
[R/util.R:47:29:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/util.R#L47) *style:* **Variable or function name should be snake_case.**
```r
single_state <- function(t, N, d) {
                            ^
```
[R/util.R:48:28:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/util.R#L48) *style:* **Commas should always have a space after.**
```r
  trans_matrix <- matrix(0,7,7)
                           ^
```
[R/util.R:48:30:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/util.R#L48) *style:* **Commas should always have a space after.**
```r
  trans_matrix <- matrix(0,7,7)
                             ^
```
[R/util.R:49:28:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/util.R#L49) *style:* **Put spaces around all infix operators.**
```r
  trans_matrix[1, ] <- c(1 -1/(2*N) - 2*d , 2*d, 0, 0, 0, 1/(2*N), 0)
                           ^~
```
[R/util.R:49:30:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/util.R#L49) *style:* **Put spaces around all infix operators.**
```r
  trans_matrix[1, ] <- c(1 -1/(2*N) - 2*d , 2*d, 0, 0, 0, 1/(2*N), 0)
                            ~^~
```
[R/util.R:49:31:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/util.R#L49) *style:* **Place a space before left parenthesis, except in a function call.**
```r
  trans_matrix[1, ] <- c(1 -1/(2*N) - 2*d , 2*d, 0, 0, 0, 1/(2*N), 0)
                              ^
```
[R/util.R:49:33:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/util.R#L49) *style:* **Put spaces around all infix operators.**
```r
  trans_matrix[1, ] <- c(1 -1/(2*N) - 2*d , 2*d, 0, 0, 0, 1/(2*N), 0)
                               ~^~
```
[R/util.R:49:40:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/util.R#L49) *style:* **Put spaces around all infix operators.**
```r
  trans_matrix[1, ] <- c(1 -1/(2*N) - 2*d , 2*d, 0, 0, 0, 1/(2*N), 0)
                                      ~^~
```
[R/util.R:49:43:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/util.R#L49) *style:* **Commas should never have a space before.**
```r
  trans_matrix[1, ] <- c(1 -1/(2*N) - 2*d , 2*d, 0, 0, 0, 1/(2*N), 0)
                                         ~^
```
[R/util.R:49:46:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/util.R#L49) *style:* **Put spaces around all infix operators.**
```r
  trans_matrix[1, ] <- c(1 -1/(2*N) - 2*d , 2*d, 0, 0, 0, 1/(2*N), 0)
                                            ~^~
```
[R/util.R:49:60:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/util.R#L49) *style:* **Put spaces around all infix operators.**
```r
  trans_matrix[1, ] <- c(1 -1/(2*N) - 2*d , 2*d, 0, 0, 0, 1/(2*N), 0)
                                                          ~^~
```
[R/util.R:49:61:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/util.R#L49) *style:* **Place a space before left parenthesis, except in a function call.**
```r
  trans_matrix[1, ] <- c(1 -1/(2*N) - 2*d , 2*d, 0, 0, 0, 1/(2*N), 0)
                                                            ^
```
[R/util.R:49:63:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/util.R#L49) *style:* **Put spaces around all infix operators.**
```r
  trans_matrix[1, ] <- c(1 -1/(2*N) - 2*d , 2*d, 0, 0, 0, 1/(2*N), 0)
                                                             ~^~
```
[R/util.R:50:27:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/util.R#L50) *style:* **Put spaces around all infix operators.**
```r
  trans_matrix[2, ] <- c(1/(2*N), 1 - 3*1/(2*N) - d, d, 2*1/(2*N), 0, 0, 0)
                         ~^~
```
[R/util.R:50:28:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/util.R#L50) *style:* **Place a space before left parenthesis, except in a function call.**
```r
  trans_matrix[2, ] <- c(1/(2*N), 1 - 3*1/(2*N) - d, d, 2*1/(2*N), 0, 0, 0)
                           ^
```
[R/util.R:50:30:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/util.R#L50) *style:* **Put spaces around all infix operators.**
```r
  trans_matrix[2, ] <- c(1/(2*N), 1 - 3*1/(2*N) - d, d, 2*1/(2*N), 0, 0, 0)
                            ~^~
```
[R/util.R:50:40:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/util.R#L50) *style:* **Put spaces around all infix operators.**
```r
  trans_matrix[2, ] <- c(1/(2*N), 1 - 3*1/(2*N) - d, d, 2*1/(2*N), 0, 0, 0)
                                      ~^~
```
[R/util.R:50:42:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/util.R#L50) *style:* **Put spaces around all infix operators.**
```r
  trans_matrix[2, ] <- c(1/(2*N), 1 - 3*1/(2*N) - d, d, 2*1/(2*N), 0, 0, 0)
                                        ~^~
```
[R/util.R:50:43:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/util.R#L50) *style:* **Place a space before left parenthesis, except in a function call.**
```r
  trans_matrix[2, ] <- c(1/(2*N), 1 - 3*1/(2*N) - d, d, 2*1/(2*N), 0, 0, 0)
                                          ^
```
[R/util.R:50:45:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/util.R#L50) *style:* **Put spaces around all infix operators.**
```r
  trans_matrix[2, ] <- c(1/(2*N), 1 - 3*1/(2*N) - d, d, 2*1/(2*N), 0, 0, 0)
                                           ~^~
```
[R/util.R:50:58:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/util.R#L50) *style:* **Put spaces around all infix operators.**
```r
  trans_matrix[2, ] <- c(1/(2*N), 1 - 3*1/(2*N) - d, d, 2*1/(2*N), 0, 0, 0)
                                                        ~^~
```
[R/util.R:50:60:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/util.R#L50) *style:* **Put spaces around all infix operators.**
```r
  trans_matrix[2, ] <- c(1/(2*N), 1 - 3*1/(2*N) - d, d, 2*1/(2*N), 0, 0, 0)
                                                          ~^~
```
[R/util.R:50:61:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/util.R#L50) *style:* **Place a space before left parenthesis, except in a function call.**
```r
  trans_matrix[2, ] <- c(1/(2*N), 1 - 3*1/(2*N) - d, d, 2*1/(2*N), 0, 0, 0)
                                                            ^
```
[R/util.R:50:63:](https://github.com/thijsjanzen/junctions/blob/3877de9630c620bf086f64c4bb83317615257b5e/R/util.R#L50) *style:* **Put spaces around all infix operators.**
```r
  trans_matrix[2, ] <- c(1/(2*N), 1 - 3*1/(2*N) - d, d, 2*1/(2*N), 0, 0, 0)
                                                             ~^~
```


В фотошопі ти лінійкою міряєш пікселі. Звідки ти береш ці значення?


Man looking back at this file.. it took me such a long time to find out which wifi driver being compatible witth a machine or not :P


If I understand well, now even image datasets are considered as video datasets but with one single frame, right?


FYI: No need to create promise, as $http.get returns promise itself


Бачу що тут вже виправлено 👍🏼


Probably better to name the component [parts more descriptively like:

le = Literal("<=")
gt = Literal(">") etc

op = le | gt | ...
var = Literal("x')
number = ...
op_expr = var + op + number | number + op + var
insym = Literal("in")
in_expr = var + insym + value_list


I believe the brackets at the double on line 6 (:message_service) are not necessary.


I can do it this evening, sounds fine to you?


Constuctor no param lúc nào cũng phải để đầu tiên sau khai báo biến


You could use pairs or a map. As I said, I'm not sure it would be much better. Not too keen on the lambda personally.


same for me. i get this error
`Uncaught TypeError: moviesTable.row is not a function
    at Object.success (Movies:137)
    at fire (jquery-3.3.1.js:3268)
    at Object.fireWith [as resolveWith] (jquery-3.3.1.js:3398)
    at done (jquery-3.3.1.js:9305)
    at XMLHttpRequest.<anonymous> (jquery-3.3.1.js:9548)`

the script removes the movie from db but not from the list in the browser. only updates the list of movies after refreshing the page


worked out plotting different graphs on the dataset. tired to find correlation and covariance between all the variables


`-Yno-adapted-args` removed since Scala 2.13.

I think `-Xlint:adapted-args` and `-Yno-adapted-args` almost the same in Scala 2.12.8.

####  "-Yno-adapted-args"
- https://github.com/scala/scala/blob/v2.12.8/src/compiler/scala/tools/nsc/typechecker/Adaptations.scala#L76-L77
- https://github.com/scala/scala/blob/v2.12.8/src/compiler/scala/tools/nsc/settings/ScalaSettings.scala#L215

#### "-Xlint:adapted-args"
- https://github.com/scala/scala/blob/v2.12.8/src/compiler/scala/tools/nsc/typechecker/Adaptations.scala#L87-L90
- https://github.com/scala/scala/blob/v2.12.8/src/compiler/scala/tools/nsc/settings/Warnings.scala#L95
- https://github.com/scala/scala/blob/v2.12.8/src/compiler/scala/tools/nsc/settings/Warnings.scala#L118


بعد از ازاد سازی نخ مورد نظر اولویت ان چک میشود که برتری دارد یا خیر


Smart enough static analyzer can warn about this function.
(You can put static_assert).

PS. There should be generic formula for N-th moments.
And is this exactly N-th moment?
In my understanding, the values `m` are moments and these functions return "central moments". It should be clearly represented in their names.


Better to use query parameters so data will be filtered on backend, so wouldn't need to download list of all movies when work with slow network


You are right. Now is available. We will test again...


# Specs execution successful
:scroll: [View logs](http://bamboo.comnull)
### Plans updated

Bamboo specs have been successfully imported and the following plans have been updated.

Project | Plan | Build
---|---|---
[Test](http://bamboo.com/browse/TEST) | [Comment test](http://bamboo.com/browse/TEST-CTEST)  | :white_check_mark: [\#1](http://bamboo.com/browse/TEST-CTEST-1)
[New project](http://bamboo.com/browse/NEW) | [Disabled plan](http://bamboo.com/browse/NEW-DISABLED) **disabled** | :white_check_mark: [\#1](http://bamboo.com/browse/NEW-DISABLED-1)

### Deployments updated

Bamboo specs have been successfully imported and the following deployment projects have been updated.

|Deployment project |
----|
[Deployment test](http://bamboo.com/deploy/viewDeploymentProjectVersions.action?id=2162689)|


Therefore i got the Error in the Issue [#106](https://github.com/chemerisuk/cordova-plugin-firebase-analytics/issues/106) now ;-)

Please update the plugin as soon as possible to work again.