[R/default_params_doc.R:188:3:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/default_params_doc.R#L188) *style:* **Variable or function name should be snake_case.**
```r
  Q,
  ^
```
[R/mbd_loglik_utils.R:14:3:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik_utils.R#L14) *style:* **Variable or function name should be snake_case.**
```r
  A <- diag(a_1[1], nrow = n_species + 2, ncol = n_species + 2)
  ^
```
[R/mbd_loglik_utils.R:23:1:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik_utils.R#L23) *style:* **Lines should not be more than 80 characters.**
```r
  A[n_species, n_species] <- A[n_species, n_species] * (1 - q) ^ (n_species - 1);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_loglik_utils.R:41:3:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik_utils.R#L41) *style:* **Variable or function name should be snake_case.**
```r
  M <- lambda * matrix_builder(n_species = max_number_of_species, k = k, q = q)
  ^
```
[R/mbd_loglik_utils.R:44:51:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik_utils.R#L44) *style:* **Do not place spaces around code in parentheses or square brackets.**
```r
  diag(M) <= (-lambda) * (1 - (1 - q) ^ (k + nvec) ) - mu * (nvec + k)
                                                  ^
```
[R/mbd_loglik_utils.R:54:1:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik_utils.R#L54) *style:* **Variable or function name should be snake_case.**
```r
create_B0 <- function(
^~~~~~~~~
```
[R/mbd_loglik_utils.R:71:1:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik_utils.R#L71) *style:* **Variable or function name should be snake_case.**
```r
create_A <- function(
^~~~~~~~
```
[R/mbd_loglik_utils.R:97:1:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik_utils.R#L97) *style:* **Variable or function name should be snake_case.**
```r
create_B <- function(
^~~~~~~~
```
[R/mbd_loglik_utils.R:120:1:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik_utils.R#L120) *style:* **Variable or function name should be snake_case.**
```r
create_A.no_mbd <- function(
^~~~~~~~~~~~~~~
```
[R/mbd_loglik_utils.R:148:1:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik_utils.R#L148) *style:* **Variable or function name should be snake_case.**
```r
create_B.no_mbd <- function(
^~~~~~~~~~~~~~~
```
[R/mbd_loglik_utils.R:161:3:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik_utils.R#L161) *style:* **Variable or function name should be snake_case.**
```r
  B <- lambda * k * diag(max_number_of_species + 1) *
  ^
```
[R/mbd_loglik_utils.R:172:1:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik_utils.R#L172) *style:* **Variable or function name should be snake_case.**
```r
A_operator <- function(
^~~~~~~~~~
```
[R/mbd_loglik_utils.R:173:3:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik_utils.R#L173) *style:* **Variable or function name should be snake_case.**
```r
  Q,
  ^
```
[R/mbd_loglik_utils.R:190:7:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik_utils.R#L190) *style:* **Commented code should be removed.**
```r
    # exp_matrix <- rsexpm:::sexpm(transition_matrix * time_interval)
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_loglik_utils.R:191:7:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik_utils.R#L191) *style:* **Commented code should be removed.**
```r
    # result     <- exp_matrix %*% Q
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_loglik_utils.R:195:5:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik_utils.R#L195) *style:* **Variable or function name should be snake_case.**
```r
    result.nan <- result.negative <- 1
    ^~~~~~~~~~
```
[R/mbd_loglik_utils.R:195:19:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik_utils.R#L195) *style:* **Variable or function name should be snake_case.**
```r
    result.nan <- result.negative <- 1
                  ^~~~~~~~~~~~~~~
```
[R/mbd_loglik_utils.R:210:7:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik_utils.R#L210) *style:* **Variable or function name should be snake_case.**
```r
      result.nan <- (any(!is.numeric(result)) || any(is.nan(result)))
      ^~~~~~~~~~
```
[R/mbd_loglik_utils.R:214:9:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik_utils.R#L214) *style:* **Variable or function name should be snake_case.**
```r
        result.negative <- (any(result < 0))
        ^~~~~~~~~~~~~~~
```
[R/mbd_loglik_utils.R:240:26:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik_utils.R#L240) *style:* **Commas should always have a space after.**
```r
      rtol = a_reltol)[2,-1],
                         ^
```
[R/mbd_loglik_utils.R:285:4:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik_utils.R#L285) *style:* **Commented code should be removed.**
```r
  #mu <- pars[2]
   ^~~~~~~~~~~~~
```
[R/mbd_loglik_utils.R:289:3:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik_utils.R#L289) *style:* **Variable or function name should be snake_case.**
```r
  Qi <- c(1, rep(0, lx))
  ^~
```
[R/mbd_loglik_utils.R:291:3:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik_utils.R#L291) *style:* **Variable or function name should be snake_case.**
```r
  T0 <- create_A(
  ^~
```
[R/mbd_loglik_utils.R:299:3:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik_utils.R#L299) *style:* **Variable or function name should be snake_case.**
```r
  Pm <- A_operator(
  ^~
```
[R/mbd_loglik_utils.R:308:45:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik_utils.R#L308) *style:* **Put spaces around all infix operators.**
```r
  soc + max(mvec[(mvec %in% which((cumsum(Pm/sum(Pm))) <= 0.95))])
                                           ~^~
```
[R/mbd_loglik_utils.R:316:1:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik_utils.R#L316) *style:* **Variable and function names should not be longer than 30 characters.**
```r
calculate_conditional_probability <- function(
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_loglik_utils.R:322:13:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik_utils.R#L322) *style:* **Only use double-quotes.**
```r
  methode = 'expo',
            ^~~~~~
```
[R/mbd_loglik_utils.R:330:3:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik_utils.R#L330) *style:* **Variable or function name should be snake_case.**
```r
  one_over_Cm <- (3 * (m + 1))/(m + 3); length(one_over_Cm)
  ^~~~~~~~~~~
```
[R/mbd_loglik_utils.R:330:31:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik_utils.R#L330) *style:* **Put spaces around all infix operators.**
```r
  one_over_Cm <- (3 * (m + 1))/(m + 3); length(one_over_Cm)
                             ~^~
```
[R/mbd_loglik_utils.R:330:32:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik_utils.R#L330) *style:* **Place a space before left parenthesis, except in a function call.**
```r
  one_over_Cm <- (3 * (m + 1))/(m + 3); length(one_over_Cm)
                               ^
```
[R/mbd_loglik_utils.R:333:3:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik_utils.R#L333) *style:* **Variable or function name should be snake_case.**
```r
  Qi <- rep(0, lx + 1);  Qi[3] <- 1
  ^~
```
[R/mbd_loglik_utils.R:335:3:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik_utils.R#L335) *style:* **Variable or function name should be snake_case.**
```r
  TM <- create_A(
  ^~
```
[R/mbd_loglik_utils.R:340:3:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik_utils.R#L340) *style:* **Variable or function name should be snake_case.**
```r
  A2_v1 <- A_operator(
  ^~~~~
```
[R/mbd_loglik_utils.R:364:1:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik_utils.R#L364) *style:* **Variable and function names should not be longer than 30 characters.**
```r
calculate_conditional_probability0 <- function(
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_loglik_utils.R:370:13:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik_utils.R#L370) *style:* **Only use double-quotes.**
```r
  methode = 'expo',
            ^~~~~~
```
[R/mbd_loglik_utils.R:378:3:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik_utils.R#L378) *style:* **Variable or function name should be snake_case.**
```r
  one_over_Cm <- (3 * (m + 1))/(m + 3); length(one_over_Cm)
  ^~~~~~~~~~~
```
[R/mbd_loglik_utils.R:378:31:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik_utils.R#L378) *style:* **Put spaces around all infix operators.**
```r
  one_over_Cm <- (3 * (m + 1))/(m + 3); length(one_over_Cm)
                             ~^~
```
[R/mbd_loglik_utils.R:378:32:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik_utils.R#L378) *style:* **Place a space before left parenthesis, except in a function call.**
```r
  one_over_Cm <- (3 * (m + 1))/(m + 3); length(one_over_Cm)
                               ^
```
[R/mbd_loglik_utils.R:380:3:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik_utils.R#L380) *style:* **Variable or function name should be snake_case.**
```r
  Qi <- c(1, rep(0, lx)); length(Qi)
  ^~
```
[R/mbd_loglik_utils.R:382:3:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik_utils.R#L382) *style:* **Variable or function name should be snake_case.**
```r
  TM <- create_A(lambda = lambda, mu = mu, nu = nu, q = q, k = soc,
  ^~
```
[R/mbd_loglik_utils.R:385:3:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik_utils.R#L385) *style:* **Variable or function name should be snake_case.**
```r
  A2_v1 <- A_operator(
  ^~~~~
```
[R/mbd_loglik_utils.R:395:54:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik_utils.R#L395) *style:* **Do not place spaces around code in parentheses or square brackets.**
```r
  missingspecies_min <- max((tips_interval[1] - 2), 0 )
                                                     ^
```
[R/mbd_loglik_utils.R:408:1:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik_utils.R#L408) *style:* **Variable and function names should not be longer than 30 characters.**
```r
calculate_conditional_probability0PB <- function(
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_loglik_utils.R:408:1:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik_utils.R#L408) *style:* **Variable or function name should be snake_case.**
```r
calculate_conditional_probability0PB <- function(
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_loglik_utils.R:414:13:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik_utils.R#L414) *style:* **Only use double-quotes.**
```r
  methode = 'expo',
            ^~~~~~
```
[R/mbd_loglik_utils.R:421:9:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik_utils.R#L421) *style:* **Only use double-quotes.**
```r
    cat('mu is supposed to be equal zero to use this function')
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_loglik_utils.R:422:12:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik_utils.R#L422) *warning:* **local variable ‘pc’ assigned but may not be used**
```r
    return(pc <- NA)
           ^~
```
[R/mbd_loglik_utils.R:426:3:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik_utils.R#L426) *style:* **Variable or function name should be snake_case.**
```r
  one_over_Cm <- (3 * (m + 1))/(m + 3); length(one_over_Cm)
  ^~~~~~~~~~~
```
[R/mbd_loglik_utils.R:426:31:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik_utils.R#L426) *style:* **Put spaces around all infix operators.**
```r
  one_over_Cm <- (3 * (m + 1))/(m + 3); length(one_over_Cm)
                             ~^~
```
[R/mbd_loglik_utils.R:426:32:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik_utils.R#L426) *style:* **Place a space before left parenthesis, except in a function call.**
```r
  one_over_Cm <- (3 * (m + 1))/(m + 3); length(one_over_Cm)
                               ^
```
[R/mbd_loglik_utils.R:428:3:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik_utils.R#L428) *style:* **Variable or function name should be snake_case.**
```r
  Qi <- c(1, rep(0, lx)); length(Qi)
  ^~
```
[R/mbd_loglik_utils.R:430:3:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik_utils.R#L430) *style:* **Variable or function name should be snake_case.**
```r
  TM <- create_A(
  ^~
```
[R/mbd_loglik_utils.R:439:3:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik_utils.R#L439) *style:* **Variable or function name should be snake_case.**
```r
  A2_v1 <- A_operator(
  ^~~~~
```
[R/mbd_loglik_utils.R:450:54:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik_utils.R#L450) *style:* **Do not place spaces around code in parentheses or square brackets.**
```r
  missingspecies_min <- max((tips_interval[1] - 2), 0 )
                                                     ^
```
[R/mbd_loglik_utils.R:454:1:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik_utils.R#L454) *style:* **Lines should not be more than 80 characters.**
```r
  opposite_tips_components <- (m + 1)[!((m + 1) %in% (tips_components[1]:tips_components[2]))]
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_loglik_utils.R:467:13:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik_utils.R#L467) *style:* **Only use double-quotes.**
```r
  methode = 'expo',
            ^~~~~~
```
[R/mbd_loglik_utils.R:474:18:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik_utils.R#L474) *style:* **Put spaces around all infix operators.**
```r
  a <- iterations/2
                ~^~
```
[R/mbd_loglik_utils.R:476:32:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik_utils.R#L476) *style:* **Put spaces around all infix operators.**
```r
  step1 <- floor(interval_width/a)
                              ~^~
```
[R/mbd_loglik_utils.R:483:3:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik_utils.R#L483) *style:* **Variable or function name should be snake_case.**
```r
  right.lx_coord <- 0
  ^~~~~~~~~~~~~~
```
[R/mbd_loglik_utils.R:497:9:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik_utils.R#L497) *style:* **Variable or function name should be snake_case.**
```r
        right.lx_coord <- i
        ^~~~~~~~~~~~~~
```
[R/mbd_loglik_utils.R:505:5:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik_utils.R#L505) *style:* **Variable or function name should be snake_case.**
```r
    right.lx_coord <- which(
    ^~~~~~~~~~~~~~
```
[R/mbd_loglik_utils.R:516:3:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik_utils.R#L516) *style:* **Variable or function name should be snake_case.**
```r
  right.lx_coord2 <- 0
  ^~~~~~~~~~~~~~~
```
[R/mbd_loglik_utils.R:530:9:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik_utils.R#L530) *style:* **Variable or function name should be snake_case.**
```r
        right.lx_coord2 <- j
        ^~~~~~~~~~~~~~~
```
[R/mbd_loglik_utils.R:536:3:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik_utils.R#L536) *style:* **Closing curly-braces should always be on their own line, unless it's followed by an else.**
```r
  }; lx_test2
  ^
```
[R/mbd_loglik_utils.R:538:5:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik_utils.R#L538) *style:* **Variable or function name should be snake_case.**
```r
    right.lx_coord2 <- which(
    ^~~~~~~~~~~~~~~
```
[R/mbd_loglik_utils.R:552:1:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik_utils.R#L552) *style:* **Variable and function names should not be longer than 30 characters.**
```r
calculate_conditional_probability1 <- function(
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_loglik_utils.R:557:13:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik_utils.R#L557) *style:* **Only use double-quotes.**
```r
  methode = 'expo',
            ^~~~~~
```
[R/mbd_loglik_utils.R:562:9:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik_utils.R#L562) *warning:* **no visible global function definition for ‘find_best_lx_for_pc’**
```r
  lx <- find_best_lx_for_pc(brts = brts, pars = pars, soc = soc)
        ^~~~~~~~~~~~~~~~~~~
```
[R/mbd_loglik_utils.R:584:9:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik_utils.R#L584) *style:* **Commented code should be removed.**
```r
    #   reltol = reltol
        ^~~~~~~~~~~~~~~
```
[R/mbd_loglik_utils.R:610:18:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik_utils.R#L610) *warning:* **no visible global function definition for ‘brts2time_intervals_and_births’**
```r
  births <- c(0, brts2time_intervals_and_births(brts)$births)
                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_loglik_utils.R:619:14:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik_utils.R#L619) *style:* **Variable or function name should be snake_case.**
```r
    pc <- 1; A2_v1 <- c(1, rep(0, max_number_of_species))
             ^~~~~
```
[R/mbd_loglik_utils.R:622:5:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik_utils.R#L622) *style:* **Variable or function name should be snake_case.**
```r
    one_over_Cm <- (3 * (m + 1)) / (m + 3)
    ^~~~~~~~~~~
```
[R/mbd_loglik_utils.R:632:5:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik_utils.R#L632) *style:* **Variable or function name should be snake_case.**
```r
    Qi <- c(1, rep(0, max_number_of_species))
    ^~
```
[R/mbd_loglik_utils.R:641:5:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik_utils.R#L641) *style:* **Variable or function name should be snake_case.**
```r
    A2_v1 <- A_operator(
    ^~~~~
```
[R/mbd_loglik_utils.R:653:7:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik_utils.R#L653) *style:* **Variable or function name should be snake_case.**
```r
      A2_v1 <- negatives_correction(A2_v1, pars)
      ^~~~~
```
[R/mbd_loglik_utils.R:653:16:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik_utils.R#L653) *warning:* **no visible global function definition for ‘negatives_correction’**
```r
      A2_v1 <- negatives_correction(A2_v1, pars)
               ^~~~~~~~~~~~~~~~~~~~
```
[R/mbd_loglik_utils.R:658:7:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik_utils.R#L658) *style:* **Variable or function name should be snake_case.**
```r
      mk_n_zero.no_mbd <- create_A.no_mbd(
      ^~~~~~~~~~~~~~~~
```
[R/mbd_loglik_utils.R:667:7:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik_utils.R#L667) *style:* **Variable or function name should be snake_case.**
```r
      A2_v1.no_mbd <- A_operator(
      ^~~~~~~~~~~~
```
[R/mbd_loglik_utils.R:676:7:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik_utils.R#L676) *style:* **Variable or function name should be snake_case.**
```r
      A2_v1 <- A2_v1 - A2_v1.no_mbd
      ^~~~~
```
[R/mbd_loglik_utils.R:698:13:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik_utils.R#L698) *style:* **Only use double-quotes.**
```r
  methode = 'expo',
            ^~~~~~
```
[R/mbd_loglik_utils.R:721:7:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik_utils.R#L721) *style:* **Commented code should be removed.**
```r
    # pc_1 <- calculate_conditional_probability(alpha = alpha, ...)$pc
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_loglik_utils.R:745:35:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik_utils.R#L745) *style:* **Put spaces around all infix operators.**
```r
      delta_pc <- abs(pc_2 - pc_1)/pc_1;
                                 ~^~
```
[R/mbd_loglik_utils.R:752:7:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik_utils.R#L752) *style:* **Commented code should be removed.**
```r
    # print(alpha)
      ^~~~~~~~~~~~
```
[R/mbd_loglik_utils.R:780:1:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik_utils.R#L780) *style:* **Trailing blank lines are superfluous.**
```r

^
```
[R/mbd_loglik_utils.R:781:1:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik_utils.R#L781) *style:* **Trailing blank lines are superfluous.**
```r

^
```
[R/mbd_loglik.R:79:15:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik.R#L79) *warning:* **no visible global function definition for ‘pmb_loglik’**
```r
    loglik <- pmb_loglik(pars = pars, brts = brts, soc = soc)
              ^~~~~~~~~~
```
[R/mbd_loglik.R:84:13:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik.R#L84) *warning:* **no visible global function definition for ‘brts2time_intervals_and_births’**
```r
    data <- brts2time_intervals_and_births(brts)
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_loglik.R:110:11:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik.R#L110) *warning:* **local variable ‘max_number_of_species’ assigned but may not be used**
```r
    lx <- max_number_of_species <- alpha * max_k;
          ^~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_loglik.R:133:9:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik.R#L133) *style:* **Commented code should be removed.**
```r
      # lx <- 10 * alpha; #bonus line to simplify
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_loglik.R:134:9:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik.R#L134) *style:* **Commented code should be removed.**
```r
      # nvec <- 0:lx
        ^~~~~~~~~~~~
```
[R/mbd_loglik.R:137:7:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik.R#L137) *style:* **Variable or function name should be snake_case.**
```r
      Qi <- c(1, rep(0, lx))
      ^~
```
[R/mbd_loglik.R:139:7:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik.R#L139) *style:* **Variable or function name should be snake_case.**
```r
      Qt <- matrix(0, ncol = (lx + 1), nrow = length(time_intervals))
      ^~
```
[R/mbd_loglik.R:140:12:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik.R#L140) *style:* **Commas should always have a space after.**
```r
      Qt[1,] <- Qi
           ^
```
[R/mbd_loglik.R:160:14:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik.R#L160) *style:* **Commas should always have a space after.**
```r
        Qt[t,] <- A_operator(
             ^
```
[R/mbd_loglik.R:161:26:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik.R#L161) *style:* **Commas should always have a space after.**
```r
          Q = Qt[(t - 1),],
                         ^
```
[R/mbd_loglik.R:172:16:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik.R#L172) *style:* **Commas should always have a space after.**
```r
          Qt[t,] <- negatives_correction(Qt[t,], pars)
               ^
```
[R/mbd_loglik.R:172:21:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik.R#L172) *warning:* **no visible global function definition for ‘negatives_correction’**
```r
          Qt[t,] <- negatives_correction(Qt[t,], pars)
                    ^~~~~~~~~~~~~~~~~~~~
```
[R/mbd_loglik.R:172:47:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik.R#L172) *style:* **Commas should always have a space after.**
```r
          Qt[t,] <- negatives_correction(Qt[t,], pars)
                                              ^
```
[R/mbd_loglik.R:174:29:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik.R#L174) *style:* **Commas should always have a space after.**
```r
        if (any(is.nan(Qt[t,])))
                            ^
```
[R/mbd_loglik.R:175:9:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik.R#L175) *style:* **Opening curly braces should never go on their own line and should always be followed by a new line.**
```r
        {
        ^
```
[R/mbd_loglik.R:176:27:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik.R#L176) *style:* **Only use double-quotes.**
```r
          if (Sys.info()[['sysname']] == "Windows")
                          ^~~~~~~~~
```
[R/mbd_loglik.R:177:11:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik.R#L177) *style:* **Opening curly braces should never go on their own line and should always be followed by a new line.**
```r
          {
          ^
```
[R/mbd_loglik.R:178:37:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik.R#L178) *style:* **Commas should always have a space after.**
```r
            print(pars); print(Qt[t,])
                                    ^
```
[R/mbd_loglik.R:182:22:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik.R#L182) *style:* **Commas should always have a space after.**
```r
        if (any(Qt[t,] < 0)) {
                     ^
```
[R/mbd_loglik.R:188:31:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik.R#L188) *style:* **Commas should always have a space after.**
```r
        C[t] <- 1 / (sum(Qt[t,])); Qt[t,] <- Qt[t,] * C[t]
                              ^
```
[R/mbd_loglik.R:188:41:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik.R#L188) *style:* **Commas should always have a space after.**
```r
        C[t] <- 1 / (sum(Qt[t,])); Qt[t,] <- Qt[t,] * C[t]
                                        ^
```
[R/mbd_loglik.R:188:51:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik.R#L188) *style:* **Commas should always have a space after.**
```r
        C[t] <- 1 / (sum(Qt[t,])); Qt[t,] <- Qt[t,] * C[t]
                                                  ^
```
[R/mbd_loglik.R:191:9:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik.R#L191) *style:* **Opening curly braces should never go on their own line and should always be followed by a new line.**
```r
        {
        ^
```
[R/mbd_loglik.R:193:11:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik.R#L193) *style:* **Variable or function name should be snake_case.**
```r
          B <- create_B(lambda = lambda, nu = nu, q = q, k = k, b = births[t],
          ^
```
[R/mbd_loglik.R:195:16:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik.R#L195) *style:* **Commas should always have a space after.**
```r
          Qt[t,] <- (B %*% Qt[t,])
               ^
```
[R/mbd_loglik.R:195:33:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik.R#L195) *style:* **Commas should always have a space after.**
```r
          Qt[t,] <- (B %*% Qt[t,])
                                ^
```
[R/mbd_loglik.R:197:18:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik.R#L197) *style:* **Commas should always have a space after.**
```r
            Qt[t,] <- negatives_correction(Qt[t,], pars)
                 ^
```
[R/mbd_loglik.R:197:23:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik.R#L197) *warning:* **no visible global function definition for ‘negatives_correction’**
```r
            Qt[t,] <- negatives_correction(Qt[t,], pars)
                      ^~~~~~~~~~~~~~~~~~~~
```
[R/mbd_loglik.R:197:49:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik.R#L197) *style:* **Commas should always have a space after.**
```r
            Qt[t,] <- negatives_correction(Qt[t,], pars)
                                                ^
```
[R/mbd_loglik.R:199:31:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik.R#L199) *style:* **Commas should always have a space after.**
```r
          if (any(is.nan(Qt[t,])))
                              ^
```
[R/mbd_loglik.R:200:11:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik.R#L200) *style:* **Opening curly braces should never go on their own line and should always be followed by a new line.**
```r
          {
          ^
```
[R/mbd_loglik.R:201:29:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik.R#L201) *style:* **Only use double-quotes.**
```r
            if (Sys.info()[['sysname']] == "Windows")
                            ^~~~~~~~~
```
[R/mbd_loglik.R:202:13:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik.R#L202) *style:* **Opening curly braces should never go on their own line and should always be followed by a new line.**
```r
            {
            ^
```
[R/mbd_loglik.R:203:39:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik.R#L203) *style:* **Commas should always have a space after.**
```r
              print(pars); print(Qt[t,])
                                      ^
```
[R/mbd_loglik.R:207:24:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik.R#L207) *style:* **Commas should always have a space after.**
```r
          if (any(Qt[t,] < 0)) {
                       ^
```
[R/mbd_loglik.R:213:33:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik.R#L213) *style:* **Commas should always have a space after.**
```r
          D[t] <- 1 / (sum(Qt[t,])); Qt[t,] <- Qt[t,] * D[t]
                                ^
```
[R/mbd_loglik.R:213:43:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik.R#L213) *style:* **Commas should always have a space after.**
```r
          D[t] <- 1 / (sum(Qt[t,])); Qt[t,] <- Qt[t,] * D[t]
                                          ^
```
[R/mbd_loglik.R:213:53:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik.R#L213) *style:* **Commas should always have a space after.**
```r
          D[t] <- 1 / (sum(Qt[t,])); Qt[t,] <- Qt[t,] * D[t]
                                                    ^
```
[R/mbd_loglik.R:237:5:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_loglik.R#L237) *style:* **Variable or function name should be snake_case.**
```r
    P  <- vm * Qt[t, (missnumspec + 1)] #I have to include +1 because of Q0
    ^
```
[R/mbd_ml.R:66:17:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_ml.R#L66) *style:* **Only use double-quotes.**
```r
  optimmethod = 'simplex',
                ^~~~~~~~~
```
[R/mbd_ml.R:74:1:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_ml.R#L74) *style:* **Opening curly braces should never go on their own line and should always be followed by a new line.**
```r
{
^
```
[R/mbd_ml.R:84:3:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_ml.R#L84) *style:* **Opening curly braces should never go on their own line and should always be followed by a new line.**
```r
  {
  ^
```
[R/mbd_ml.R:87:31:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_ml.R#L87) *style:* **Opening curly braces should never go on their own line and should always be followed by a new line.**
```r
  if (length(idparsfix) == 0) {idparsfix <- NULL}
                              ^
```
[R/mbd_ml.R:87:49:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_ml.R#L87) *style:* **Closing curly-braces should always be on their own line, unless it's followed by an else.**
```r
  if (length(idparsfix) == 0) {idparsfix <- NULL}
                                                ^
```
[R/mbd_ml.R:99:3:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_ml.R#L99) *style:* **Opening curly braces should never go on their own line and should always be followed by a new line.**
```r
  {
  ^
```
[R/mbd_ml.R:134:15:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_ml.R#L134) *style:* **Use <-, not =, for assignment.**
```r
    trparsopt = initparsopt/(1 + initparsopt)
              ^
```
[R/mbd_ml.R:134:28:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_ml.R#L134) *style:* **Put spaces around all infix operators.**
```r
    trparsopt = initparsopt/(1 + initparsopt)
                          ~^~
```
[R/mbd_ml.R:134:29:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_ml.R#L134) *style:* **Place a space before left parenthesis, except in a function call.**
```r
    trparsopt = initparsopt/(1 + initparsopt)
                            ^
```
[R/mbd_ml.R:135:42:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_ml.R#L135) *style:* **Use <-, not =, for assignment.**
```r
    trparsopt[which(initparsopt == Inf)] = 1
                                         ^
```
[R/mbd_ml.R:136:15:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_ml.R#L136) *style:* **Use <-, not =, for assignment.**
```r
    trparsfix = parsfix/(1 + parsfix)
              ^
```
[R/mbd_ml.R:136:24:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_ml.R#L136) *style:* **Put spaces around all infix operators.**
```r
    trparsfix = parsfix/(1 + parsfix)
                      ~^~
```
[R/mbd_ml.R:136:25:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_ml.R#L136) *style:* **Place a space before left parenthesis, except in a function call.**
```r
    trparsfix = parsfix/(1 + parsfix)
                        ^
```
[R/mbd_ml.R:137:38:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_ml.R#L137) *style:* **Use <-, not =, for assignment.**
```r
    trparsfix[which(parsfix == Inf)] = 1
                                     ^
```
[R/mbd_ml.R:194:3:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_ml.R#L194) *style:* **Variable or function name should be snake_case.**
```r
  MLtrpars <- as.numeric(unlist(out$par))
  ^~~~~~~~
```
[R/mbd_ml.R:197:5:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_ml.R#L197) *style:* **Variable or function name should be snake_case.**
```r
    MLpars <- MLtrpars / (1 - MLtrpars)
    ^~~~~~
```
[R/mbd_ml.R:199:5:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_ml.R#L199) *style:* **Variable or function name should be snake_case.**
```r
    MLpars <- MLtrpars
    ^~~~~~
```
[R/mbd_ml.R:201:3:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_ml.R#L201) *style:* **Variable or function name should be snake_case.**
```r
  MLpars1 <- rep(0, n_pars); names(MLpars1) <- namepars
  ^~~~~~~
```
[R/mbd_ml.R:203:31:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_ml.R#L203) *style:* **Opening curly braces should never go on their own line and should always be followed by a new line.**
```r
  if (length(idparsfix) != 0) {MLpars1[idparsfix] <- parsfix}
                              ^
```
[R/mbd_ml.R:203:61:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_ml.R#L203) *style:* **Closing curly-braces should always be on their own line, unless it's followed by an else.**
```r
  if (length(idparsfix) != 0) {MLpars1[idparsfix] <- parsfix}
                                                            ^
```
[R/mbd_ml.R:204:3:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_ml.R#L204) *style:* **Variable or function name should be snake_case.**
```r
  ML <- as.numeric(unlist(out$fvalues))
  ^~
```
[R/mbd_ml.R:205:1:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_ml.R#L205) *style:* **Lines should not be more than 80 characters.**
```r
  out2 <- data.frame(t(MLpars1), loglik = ML, df = length(initparsopt), conv = unlist(out$conv))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_ml.R:209:3:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_ml.R#L209) *style:* **Opening curly braces should never go on their own line and should always be followed by a new line.**
```r
  {
  ^
```
[R/mbd_ml.R:210:1:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_ml.R#L210) *style:* **Lines should not be more than 80 characters.**
```r
    tobeprint <- paste(tobeprint, paste(names(MLpars1[ii]), ":", sep = ""),MLpars1[ii])
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_ml.R:210:76:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_ml.R#L210) *style:* **Commas should always have a space after.**
```r
    tobeprint <- paste(tobeprint, paste(names(MLpars1[ii]), ":", sep = ""),MLpars1[ii])
                                                                           ^
```
[R/mbd_ml.R:219:19:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_ml.R#L219) *style:* **Only use double-quotes.**
```r
    s2 <- sprintf('Maximum loglikelihood: %f',ML)
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_ml.R:219:47:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_ml.R#L219) *style:* **Commas should always have a space after.**
```r
    s2 <- sprintf('Maximum loglikelihood: %f',ML)
                                              ^
```
[R/mbd_ml2.R:78:4:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_ml2.R#L78) *style:* **Commented code should be removed.**
```r
  #idparsopt <- which(estimated_params %in% get_mbd_param_names())
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_ml2.R:79:4:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_ml2.R#L79) *style:* **Commented code should be removed.**
```r
  #idparsfix <- which(fixed_params %in% get_mbd_param_names())
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_ml2.R:83:19:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_ml2.R#L83) *warning:* **no visible global function definition for ‘get_mbd_param_names’**
```r
    param_name <- get_mbd_param_names()[i]
                  ^~~~~~~~~~~~~~~~~~~
```
[R/mbd_pure_multiple_birth.R:13:24:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_pure_multiple_birth.R#L13) *style:* **Commented code should be removed.**
```r
  test_pars <- pars  # test_pars=c(0.4,0,0.1,0.2)
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_pure_multiple_birth.R:14:24:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_pure_multiple_birth.R#L14) *style:* **Commented code should be removed.**
```r
  test_brts <- brts  # test_brts=c(-10,-5,-5,-3,-3,-3,-2,-1,-1,-1)
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_pure_multiple_birth.R:30:13:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_pure_multiple_birth.R#L30) *warning:* **no visible global function definition for ‘brts2time_intervals_and_births’**
```r
    data <- brts2time_intervals_and_births(test_brts)
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_pure_multiple_birth.R:39:5:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_pure_multiple_birth.R#L39) *style:* **Opening curly braces should never go on their own line and should always be followed by a new line.**
```r
    {
    ^
```
[R/mbd_pure_multiple_birth.R:41:41:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_pure_multiple_birth.R#L41) *style:* **Put spaces around all infix operators.**
```r
      poisson_term <- stats::dpois(i, nu*time_intervals[t], log = FALSE)[
                                       ~^~
```
[R/mbd_pure_multiple_birth.R:42:27:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_pure_multiple_birth.R#L42) *style:* **Put spaces around all infix operators.**
```r
        stats::dpois(i, nu*time_intervals[t], log = FALSE) != 0]
                         ~^~
```
[R/mbd_pure_multiple_birth.R:43:33:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_pure_multiple_birth.R#L43) *style:* **Put spaces around all infix operators.**
```r
      ii <- i[stats::dpois(i, nu*time_intervals[t], log = FALSE) != 0 ]
                               ~^~
```
[R/mbd_pure_multiple_birth.R:43:70:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_pure_multiple_birth.R#L43) *style:* **Do not place spaces around code in parentheses or square brackets.**
```r
      ii <- i[stats::dpois(i, nu*time_intervals[t], log = FALSE) != 0 ]
                                                                     ^
```
[R/mbd_pure_multiple_birth.R:47:24:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_pure_multiple_birth.R#L47) *style:* **Do not place spaces around code in parentheses or square brackets.**
```r
      a_term[t] <- sum( (1 - q) ^ (ii * k[t]) * poisson_term ) * # (1)
                       ^
```
[R/mbd_pure_multiple_birth.R:47:61:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_pure_multiple_birth.R#L47) *style:* **Do not place spaces around code in parentheses or square brackets.**
```r
      a_term[t] <- sum( (1 - q) ^ (ii * k[t]) * poisson_term ) * # (1)
                                                            ^
```
[R/mbd_pure_multiple_birth.R:55:1:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_pure_multiple_birth.R#L55) *style:* **Lines should not be more than 80 characters.**
```r
    ) + lambda * k[-length(k)] * (births == 1)                                               # lambda contribution: lambda*k (only if b==1)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_pure_multiple_birth.R:66:1:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_pure_multiple_birth.R#L66) *style:* **Variable or function name should be snake_case.**
```r
pmb_loglik_Qvector <- function(pars, brts, soc = 2){
^~~~~~~~~~~~~~~~~~
```
[R/mbd_pure_multiple_birth.R:71:24:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_pure_multiple_birth.R#L71) *style:* **Commented code should be removed.**
```r
  test_pars <- pars  # test_pars=c(0.4,0,0.1,0.2)
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_pure_multiple_birth.R:72:24:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_pure_multiple_birth.R#L72) *style:* **Commented code should be removed.**
```r
  test_brts <- brts  # test_brts=c(-10,-5,-5,-3,-3,-3,-2,-1,-1,-1)
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_pure_multiple_birth.R:74:1:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_pure_multiple_birth.R#L74) *style:* **Lines should not be more than 80 characters.**
```r
  # loglik=mbd_loglik(pars = test_pars, brts = test_brts, soc = soc, cond = 0, tips_interval = c(0,Inf))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_pure_multiple_birth.R:74:5:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_pure_multiple_birth.R#L74) *style:* **Commented code should be removed.**
```r
  # loglik=mbd_loglik(pars = test_pars, brts = test_brts, soc = soc, cond = 0, tips_interval = c(0,Inf))
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_pure_multiple_birth.R:82:1:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_pure_multiple_birth.R#L82) *style:* **Lines should not be more than 80 characters.**
```r
  condition1 <- (any(is.nan(test_pars)) != 0 | any(is.infinite(test_pars)) != 0 )
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_pure_multiple_birth.R:82:80:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_pure_multiple_birth.R#L82) *style:* **Do not place spaces around code in parentheses or square brackets.**
```r
  condition1 <- (any(is.nan(test_pars)) != 0 | any(is.infinite(test_pars)) != 0 )
                                                                               ^
```
[R/mbd_pure_multiple_birth.R:87:13:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_pure_multiple_birth.R#L87) *warning:* **no visible global function definition for ‘brts2time_intervals_and_births’**
```r
    data <- brts2time_intervals_and_births(test_brts)
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_pure_multiple_birth.R:91:47:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_pure_multiple_birth.R#L91) *style:* **Do not place spaces around code in parentheses or square brackets.**
```r
    a_term <- rep(1, length(time_intervals)    ) #branches
                                              ^
```
[R/mbd_pure_multiple_birth.R:96:5:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_pure_multiple_birth.R#L96) *style:* **Opening curly braces should never go on their own line and should always be followed by a new line.**
```r
    {
    ^
```
[R/mbd_pure_multiple_birth.R:102:1:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_pure_multiple_birth.R#L102) *style:* **Lines should not be more than 80 characters.**
```r
      # (1) nu contribution: (1-q)^(k*i) * (nu*(t_k-t_k-1))^i*exp(-nu*(t_k-t_k-1))/i!
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_pure_multiple_birth.R:104:24:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_pure_multiple_birth.R#L104) *style:* **Do not place spaces around code in parentheses or square brackets.**
```r
      a_term[t] <- sum( (1 - q) ^ (ii * k[t]) * poisson_term ) * # (1)
                       ^
```
[R/mbd_pure_multiple_birth.R:104:61:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_pure_multiple_birth.R#L104) *style:* **Do not place spaces around code in parentheses or square brackets.**
```r
      a_term[t] <- sum( (1 - q) ^ (ii * k[t]) * poisson_term ) * # (1)
                                                            ^
```
[R/mbd_pure_multiple_birth.R:112:17:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_pure_multiple_birth.R#L112) *style:* **Place a space before left parenthesis, except in a function call.**
```r
        (1 - q)^(k[-length(k)] - births)                 # (1)
                ^
```
[R/mbd_pure_multiple_birth.R:141:5:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_pure_multiple_birth.R#L141) *style:* **Commented code should be removed.**
```r
  # cond <- 0
    ^~~~~~~~~
```
[R/mbd_pure_multiple_birth.R:147:1:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_pure_multiple_birth.R#L147) *style:* **Lines should not be more than 80 characters.**
```r
  # idparsopt=(1:3)[-c(idparsfix)] #this argument is useless but I let the user specify it because Rampal also did it (for some reason)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_pure_multiple_birth.R:147:5:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_pure_multiple_birth.R#L147) *style:* **Commented code should be removed.**
```r
  # idparsopt=(1:3)[-c(idparsfix)] #this argument is useless but I let the user specify it because Rampal also did it (for some reason)
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_pure_multiple_birth.R:153:33:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_pure_multiple_birth.R#L153) *style:* **Do not place spaces around code in parentheses or square brackets.**
```r
  if (min(trpars1[1:n_pars]) < 0 ) {
                                ^
```
[R/mbd_pure_multiple_birth.R:162:15:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_pure_multiple_birth.R#L162) *warning:* **no visible global function definition for ‘pmb_loglik’**
```r
    loglik <- pmb_loglik(pars = pars1, brts = brts)
              ^~~~~~~~~~
```
[R/mbd_pure_multiple_birth.R:165:1:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_pure_multiple_birth.R#L165) *style:* **Lines should not be more than 80 characters.**
```r
    cat("There are parameter values used which cause numerical problems:", trpars1, "\n")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_pure_multiple_birth.R:175:1:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_pure_multiple_birth.R#L175) *style:* **Variable or function name should be snake_case.**
```r
pmb_ML <- function(
^~~~~~
```
[R/mbd_pure_multiple_birth.R:184:17:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_pure_multiple_birth.R#L184) *style:* **Only use double-quotes.**
```r
  optimmethod = 'simplex',
                ^~~~~~~~~
```
[R/mbd_pure_multiple_birth.R:189:1:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_pure_multiple_birth.R#L189) *style:* **Lines should not be more than 80 characters.**
```r
  # - changeloglikifnoconv = if T the loglik will be set to -Inf if ML does not converge
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_pure_multiple_birth.R:191:1:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_pure_multiple_birth.R#L191) *style:* **Lines should not be more than 80 characters.**
```r
  # - changeloglikifnoconv = if T the loglik will be set to -Inf if ML does not converge
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_pure_multiple_birth.R:192:1:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_pure_multiple_birth.R#L192) *style:* **Lines should not be more than 80 characters.**
```r
  # - optimmethod = 'simplex' (current default) or 'subplex' (default of previous versions)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_pure_multiple_birth.R:197:1:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_pure_multiple_birth.R#L197) *style:* **Lines should not be more than 80 characters.**
```r
  n_pars <- length(namepars); #if you add more parameters to your model just change this
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_pure_multiple_birth.R:198:1:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_pure_multiple_birth.R#L198) *style:* **Lines should not be more than 80 characters.**
```r
  failpars <- rep(-1, n_pars); names(failpars) <- namepars; #those are the parameters that you get if something goes sideways
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_pure_multiple_birth.R:226:33:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_pure_multiple_birth.R#L226) *style:* **Put spaces around all infix operators.**
```r
        trparsopt <- initparsopt/(1 + initparsopt)
                               ~^~
```
[R/mbd_pure_multiple_birth.R:226:34:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_pure_multiple_birth.R#L226) *style:* **Place a space before left parenthesis, except in a function call.**
```r
        trparsopt <- initparsopt/(1 + initparsopt)
                                 ^
```
[R/mbd_pure_multiple_birth.R:228:29:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_pure_multiple_birth.R#L228) *style:* **Put spaces around all infix operators.**
```r
        trparsfix <- parsfix/(1 + parsfix)
                           ~^~
```
[R/mbd_pure_multiple_birth.R:228:30:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_pure_multiple_birth.R#L228) *style:* **Place a space before left parenthesis, except in a function call.**
```r
        trparsfix <- parsfix/(1 + parsfix)
                             ^
```
[R/mbd_pure_multiple_birth.R:240:8:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_pure_multiple_birth.R#L240) *style:* **Trailing whitespace is superfluous.**
```r
      )
       ^
```
[R/mbd_pure_multiple_birth.R:241:1:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_pure_multiple_birth.R#L241) *style:* **Lines should not be more than 80 characters.**
```r
      cat("The loglikelihood for the initial parameter values is", initloglik, "\n")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_pure_multiple_birth.R:244:1:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_pure_multiple_birth.R#L244) *style:* **Lines should not be more than 80 characters.**
```r
        cat("The initial parameter values have a likelihood that is equal to 0 or below machine precision. Try again with different initial values.\n")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_pure_multiple_birth.R:248:1:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_pure_multiple_birth.R#L248) *style:* **Lines should not be more than 80 characters.**
```r
                               fun = pmb_loglik_choosepar, trparsopt = trparsopt,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_pure_multiple_birth.R:253:1:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_pure_multiple_birth.R#L253) *style:* **Lines should not be more than 80 characters.**
```r
          cat("Optimization has not converged. Try again with different initial values.\n")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_pure_multiple_birth.R:256:11:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_pure_multiple_birth.R#L256) *style:* **Variable or function name should be snake_case.**
```r
          MLtrpars <- as.numeric(unlist(out$par))
          ^~~~~~~~
```
[R/mbd_pure_multiple_birth.R:258:13:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_pure_multiple_birth.R#L258) *style:* **Variable or function name should be snake_case.**
```r
            MLpars <- MLtrpars/(1 - MLtrpars)
            ^~~~~~
```
[R/mbd_pure_multiple_birth.R:258:31:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_pure_multiple_birth.R#L258) *style:* **Put spaces around all infix operators.**
```r
            MLpars <- MLtrpars/(1 - MLtrpars)
                             ~^~
```
[R/mbd_pure_multiple_birth.R:258:32:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_pure_multiple_birth.R#L258) *style:* **Place a space before left parenthesis, except in a function call.**
```r
            MLpars <- MLtrpars/(1 - MLtrpars)
                               ^
```
[R/mbd_pure_multiple_birth.R:260:13:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_pure_multiple_birth.R#L260) *style:* **Variable or function name should be snake_case.**
```r
            MLpars <- MLtrpars
            ^~~~~~
```
[R/mbd_pure_multiple_birth.R:262:11:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_pure_multiple_birth.R#L262) *style:* **Variable or function name should be snake_case.**
```r
          MLpars1 <- rep(0, n_pars)
          ^~~~~~~
```
[R/mbd_pure_multiple_birth.R:268:11:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_pure_multiple_birth.R#L268) *style:* **Variable or function name should be snake_case.**
```r
          ML <- as.numeric(unlist(out$fvalues))
          ^~
```
[R/mbd_pure_multiple_birth.R:269:1:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_pure_multiple_birth.R#L269) *style:* **Lines should not be more than 80 characters.**
```r
          out2 <- data.frame(t(MLpars1), loglik = ML, df = length(initparsopt), conv = unlist(out$conv))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_pure_multiple_birth.R:273:11:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_pure_multiple_birth.R#L273) *style:* **Opening curly braces should never go on their own line and should always be followed by a new line.**
```r
          {
          ^
```
[R/mbd_pure_multiple_birth.R:274:1:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_pure_multiple_birth.R#L274) *style:* **Lines should not be more than 80 characters.**
```r
            tobeprint <- paste(tobeprint, paste(names(MLpars1[ii]), ":", sep = ""),MLpars1[ii])
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_pure_multiple_birth.R:274:84:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_pure_multiple_birth.R#L274) *style:* **Commas should always have a space after.**
```r
            tobeprint <- paste(tobeprint, paste(names(MLpars1[ii]), ":", sep = ""),MLpars1[ii])
                                                                                ^
```
[R/mbd_pure_multiple_birth.R:281:25:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_pure_multiple_birth.R#L281) *style:* **Only use double-quotes.**
```r
          s2 <- sprintf('Maximum loglikelihood: %f',ML)
                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_pure_multiple_birth.R:281:53:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_pure_multiple_birth.R#L281) *style:* **Commas should always have a space after.**
```r
          s2 <- sprintf('Maximum loglikelihood: %f',ML)
                                                    ^
```
[R/mbd_pure_multiple_birth.R:289:1:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_pure_multiple_birth.R#L289) *style:* **Trailing blank lines are superfluous.**
```r

^
```
[R/mbd_sim.R:92:7:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_sim.R#L92) *style:* **Variable or function name should be snake_case.**
```r
      L <- matrix(0, nrow = 1e6, 4)
      ^
```
[R/mbd_sim.R:93:10:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_sim.R#L93) *style:* **Commas should always have a space after.**
```r
      L[,4] <- -1
         ^
```
[R/mbd_sim.R:95:27:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_sim.R#L95) *style:* **Commas should always have a space after.**
```r
      L[1, 1:4] <- c(t, 0,-1, -1)
                          ^
```
[R/mbd_sim.R:96:24:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_sim.R#L96) *style:* **Commas should always have a space after.**
```r
      L[2, 1:4] <- c(t,-1, 2, -1)
                       ^
```
[R/mbd_sim.R:101:11:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_sim.R#L101) *style:* **Variable or function name should be snake_case.**
```r
          deltaT <- stats::rexp(1, rate = total_rate)
          ^~~~~~
```
[R/mbd_sim.R:102:1:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_sim.R#L102) *style:* **Lines should not be more than 80 characters.**
```r
          outcome <- sample(c(-1, 1, 2), size = 1, prob = c(n_species * mu, n_species * lambda, nu))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_sim.R:103:1:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_sim.R#L103) *style:* **Lines should not be more than 80 characters.**
```r
          delta_n <- -1 * (outcome == -1) + 1 * (outcome == 1) + (outcome == 2) * stats::rbinom(n = 1, size = n_species, prob = q)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_sim.R:113:1:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_sim.R#L113) *style:* **Lines should not be more than 80 characters.**
```r
            L[new_interval, 1] <- t#-(delta_n:1)*1e-5 add this if you need separate time points
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_sim.R:117:62:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_sim.R#L117) *style:* **Do not place spaces around code in parentheses or square brackets.**
```r
            pool <- c(pool, abs(new_interval) * sign(parents) )
                                                             ^
```
[R/mbd_sim.R:126:25:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_sim.R#L126) *style:* **Commas should always have a space after.**
```r
            L[abs(dead),4] <- t
                        ^
```
[R/mbd_sim.R:134:5:](https://github.com/Giappo/mbd/blob/7c23af0f3b3fb5a0801f8881f71b66b68e493d3c/R/mbd_sim.R#L134) *style:* **Variable or function name should be snake_case.**
```r
    L <- L[(1:total_count),]
    ^
```


@anschau1992 , please check whole test file for these kinds of mistakes since you know your test logic better. make sure that reviewer2 and review3 and so on are always correctly assigned. thx


![](https://github.trello.services/images/mini-trello-icon.png) [refactor CSS side effect](https://trello.com/c/qwMEzkFL/52-refactor-css-side-effect)


柴田
コメントをもう少し具体的に。
引数が1の場合、2の場合に例外を投げていることは分かりますが、何が違うのかわかりません。
(数字だけではないはず)


The 8-day aggregation re-starts every January 1st, so the last image of each year is not an 8 day product but either 4 or 5 days according to leap years. Again, the problem is the way i.modis.import writes the file that you use with t.register. If you download from 2017-01-01 to 2017-12-31, the end_date reported by t.info after you register the time series should be 2018-01-01. Please, give a look at the file that you get from i.modis.import and you'll see that the problem is there (I reported the issue in trac https://trac.osgeo.org/grass/ticket/3654). A very quick trick to get it right for the course is to manually edit the end_date of the last product in the text file that you get from i.modis.import.


这个我看过了，但是官方也没有直接说结果集会发生什么变化。我想应该是不会改动已经得到的结果集res，因为结果集res可能还需要用来做其他用途，应该是mysql_fetch_row本身记录了下次要在结果集中要取得的行，而不是去改变res本身，这样就对了。张老师怎么看


Я так понимаю лишний пробел между ] (


Reference https://github.com/commitsto/commits.to/issues/240


remove


res  应该对应于数据库里的游标，为了数据库效率的提高，一般打开时默认是单向滚动的，即只能向前，不能后退。当fetch发生时，数据库将释放之前的数据。所以如果要复用，需要自己做一个缓存层。类似pdo_query


Braces style


Esto rompe el esquema del survey.

"class" no debería de tener incluido el name.
Esto ocasiona este problema:

![selection_003](https://user-images.githubusercontent.com/158935/46078988-110b2b80-c196-11e8-86e4-b1473d232784.png)

Reportado en:

https://task.beeznest.com/issues/14875

@aragonc lo puedes corregir?


Yeah, the picture isn't very clear with all the hot melt covering things.

I'll see about fixing it up later today (at work ATM), hopefully a pic of the board with the signal overlay on top.


braces


或者参考
https://dev.mysql.com/doc/refman/8.0/en/mysql-store-result.html


@remicollet  En tout cas, un grand merci à vous pour avoir corrigé le souci !


Successfully aliased the URL <https://paulkinlanme-kkrljlxuhd.now.sh> to the following alias.

* https://paul.kinlan.me


Hello @webdizz ,
Were you able to run the original experiments and get the same result?
I made the same changes, but the accuracy are always 50%.
Thanks!


我认为res本身应该没动的，不然的话这段代码早就出问题了，你看，如果res本身就在移动，那么最后一定会移动的NULL，那么i一定会被赋为0，如果这样的话后面纠错了，本来已经保存好的solution_id就都被清空了，因此res本身没动
while (res!=NULL && (row = mysql_fetch_row(res)) != NULL) {		//逐行取出查询结果的第一列
		jobs[i++] = atoi(row[0]);
	}

	if(res!=NULL&&!executesql("commit")){
		mysql_free_result(res);
		res=NULL;
	}
	else i=0;


define -1


I needed these aggregate function and finaly found this patch. The doc had not been updated !


这取决于之前产生res的方式
是
https://dev.mysql.com/doc/refman/8.0/en/mysql-store-result.html
还是
https://dev.mysql.com/doc/refman/8.0/en/mysql-use-result.html


eBLEU будет вечно жить в наших сердцах


孩子们的游戏(圆圈中最后剩下的数)


> You may not use mysql_data_seek(), mysql_row_seek(), mysql_row_tell(), mysql_num_rows(), or mysql_affected_rows() with a result returned from mysql_use_result(), nor may you issue other queries until mysql_use_result() has finished. (However, after you have fetched all the rows, mysql_num_rows() accurately returns the number of rows fetched.)

注意这段话


Shouldn't this be `let c = a + y`


rm empty line


@lemzwerg please request a pull for that.


:( Я хотел сделать, тёмной(((


@lemzwerg Ditto. You will need to bump the package revision for that.


I got that, but wanted to know if there's any project configuration that allows having non-referenced build files. We could change the logic to loop through build files directly, but given that it's a misconfiguration of the project I wouldn't add the logic. What I'd do instead is using a different value for the temporary references to indicate that they might be orphaned in the project. Something like: `TMP_XXXX` or `NOT_REFERENCED_XXX`.


# 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)|


It is generally better if `openmaintainer` is on the same line as the rest so that grepping works more easily. Please fix this when you request a pull for the rest.


It can never be empty it is either null or I am creating it with guid