[R/default_params_doc.R:188:3:](https://github.com/Giappo/mbd/blob/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/R/default_params_doc.R#L188) *style:* **Variable or function name should be snake_case.**
```r
  Q,
  ^
```
[R/mbd_loglik_utils.R:5:1:](https://github.com/Giappo/mbd/blob/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/R/mbd_loglik_utils.R#L5) *style:* **Variable or function name should be snake_case.**
```r
hyperA_HannoX <- function(n_species, k, q) {
^~~~~~~~~~~~~
```
[R/mbd_loglik_utils.R:14:3:](https://github.com/Giappo/mbd/blob/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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:21:52:](https://github.com/Giappo/mbd/blob/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/R/mbd_loglik_utils.R#L21) *style:* **Place a space before left parenthesis, except in a function call.**
```r
    A[s, src] <- A[s, src] * q ^ (m - n) * (1 - q)^(2 * n - m)
                                                   ^
```
[R/mbd_loglik_utils.R:23:27:](https://github.com/Giappo/mbd/blob/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/R/mbd_loglik_utils.R#L23) *style:* **Use <-, not =, for assignment.**
```r
  A[n_species, n_species] = A[n_species, n_species] * (1 - q) ^ (n_species - 1);
                          ^
```
[R/mbd_loglik_utils.R:31:1:](https://github.com/Giappo/mbd/blob/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/R/mbd_loglik_utils.R#L31) *style:* **Variable or function name should be snake_case.**
```r
create_A0 <- function(
^~~~~~~~~
```
[R/mbd_loglik_utils.R:41:3:](https://github.com/Giappo/mbd/blob/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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:39:](https://github.com/Giappo/mbd/blob/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/R/mbd_loglik_utils.R#L44) *style:* **Place a space before left parenthesis, except in a function call.**
```r
  diag(M) <= (-lambda) * (1 - (1 - q)^(k + nvec) ) - mu * (nvec + k)
                                      ^
```
[R/mbd_loglik_utils.R:44:49:](https://github.com/Giappo/mbd/blob/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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:46:27:](https://github.com/Giappo/mbd/blob/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/R/mbd_loglik_utils.R#L46) *style:* **Use <-, not =, for assignment.**
```r
  M[row(M) == col(M) - 1] = mu * nvec[2:(max_number_of_species + 1)]
                          ^
```
[R/mbd_loglik_utils.R:54:1:](https://github.com/Giappo/mbd/blob/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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:120:17:](https://github.com/Giappo/mbd/blob/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/R/mbd_loglik_utils.R#L120) *style:* **Use <-, not =, for assignment.**
```r
create_A.no_mbd = function(
                ^
```
[R/mbd_loglik_utils.R:148:1:](https://github.com/Giappo/mbd/blob/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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:148:17:](https://github.com/Giappo/mbd/blob/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/R/mbd_loglik_utils.R#L148) *style:* **Use <-, not =, for assignment.**
```r
create_B.no_mbd = function(
                ^
```
[R/mbd_loglik_utils.R:161:3:](https://github.com/Giappo/mbd/blob/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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:260:21:](https://github.com/Giappo/mbd/blob/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/R/mbd_loglik_utils.R#L260) *style:* **Use <-, not =, for assignment.**
```r
    starting_vector = x
                    ^
```
[R/mbd_loglik_utils.R:261:23:](https://github.com/Giappo/mbd/blob/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/R/mbd_loglik_utils.R#L261) *style:* **Use <-, not =, for assignment.**
```r
    transition_matrix = pars
                      ^
```
[R/mbd_loglik_utils.R:262:9:](https://github.com/Giappo/mbd/blob/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/R/mbd_loglik_utils.R#L262) *style:* **Use <-, not =, for assignment.**
```r
    dx  = rep(0, length(starting_vector))
        ^
```
[R/mbd_loglik_utils.R:263:9:](https://github.com/Giappo/mbd/blob/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/R/mbd_loglik_utils.R#L263) *style:* **Use <-, not =, for assignment.**
```r
    dx  = drop(transition_matrix %*% starting_vector)
        ^
```
[R/mbd_loglik_utils.R:264:9:](https://github.com/Giappo/mbd/blob/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/R/mbd_loglik_utils.R#L264) *style:* **Use <-, not =, for assignment.**
```r
    out = (dx)
        ^
```
[R/mbd_loglik_utils.R:265:16:](https://github.com/Giappo/mbd/blob/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/R/mbd_loglik_utils.R#L265) *style:* **Use <-, not =, for assignment.**
```r
    names(out) = names(x)
               ^
```
[R/mbd_loglik_utils.R:285:4:](https://github.com/Giappo/mbd/blob/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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:751:11:](https://github.com/Giappo/mbd/blob/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/R/mbd_loglik_utils.R#L751) *style:* **Use <-, not =, for assignment.**
```r
    count = count + 1
          ^
```
[R/mbd_loglik_utils.R:752:7:](https://github.com/Giappo/mbd/blob/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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:115:12:](https://github.com/Giappo/mbd/blob/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/R/mbd_ml.R#L115) *style:* **Use <-, not =, for assignment.**
```r
    optstr = "nothing"
           ^
```
[R/mbd_ml.R:117:12:](https://github.com/Giappo/mbd/blob/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/R/mbd_ml.R#L117) *style:* **Use <-, not =, for assignment.**
```r
    optstr = namepars[idparsopt]
           ^
```
[R/mbd_ml.R:123:12:](https://github.com/Giappo/mbd/blob/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/R/mbd_ml.R#L123) *style:* **Use <-, not =, for assignment.**
```r
    fixstr = "nothing"
           ^
```
[R/mbd_ml.R:125:12:](https://github.com/Giappo/mbd/blob/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/R/mbd_ml.R#L125) *style:* **Use <-, not =, for assignment.**
```r
    fixstr = namepars[idparsfix]
           ^
```
[R/mbd_ml.R:134:15:](https://github.com/Giappo/mbd/blob/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/R/mbd_ml.R#L197) *style:* **Variable or function name should be snake_case.**
```r
    MLpars = MLtrpars / (1 - MLtrpars)
    ^~~~~~
```
[R/mbd_ml.R:197:12:](https://github.com/Giappo/mbd/blob/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/R/mbd_ml.R#L197) *style:* **Use <-, not =, for assignment.**
```r
    MLpars = MLtrpars / (1 - MLtrpars)
           ^
```
[R/mbd_ml.R:199:5:](https://github.com/Giappo/mbd/blob/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/R/mbd_ml.R#L219) *style:* **Commas should always have a space after.**
```r
    s2 <- sprintf('Maximum loglikelihood: %f',ML)
                                              ^
```
[R/mbd_pure_multiple_birth.R:13:24:](https://github.com/Giappo/mbd/blob/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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:28:15:](https://github.com/Giappo/mbd/blob/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/R/mbd_pure_multiple_birth.R#L28) *style:* **Use <-, not =, for assignment.**
```r
    th_loglik = -Inf
              ^
```
[R/mbd_pure_multiple_birth.R:30:13:](https://github.com/Giappo/mbd/blob/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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:33:](https://github.com/Giappo/mbd/blob/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/R/mbd_pure_multiple_birth.R#L47) *style:* **Place a space before left parenthesis, except in a function call.**
```r
      a_term[t] <- sum( (1 - q)^(ii * k[t]) * poisson_term ) * # (1)
                                ^
```
[R/mbd_pure_multiple_birth.R:47:59:](https://github.com/Giappo/mbd/blob/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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:85:15:](https://github.com/Giappo/mbd/blob/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/R/mbd_pure_multiple_birth.R#L85) *style:* **Use <-, not =, for assignment.**
```r
    th_loglik = -Inf
              ^
```
[R/mbd_pure_multiple_birth.R:87:13:](https://github.com/Giappo/mbd/blob/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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:110:1:](https://github.com/Giappo/mbd/blob/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/R/mbd_pure_multiple_birth.R#L110) *style:* **Lines should not be more than 80 characters.**
```r
      nu * choose(k[-length(k)], births) * q^births * (1 - q)^(k[-length(k)] - births)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_pure_multiple_birth.R:110:63:](https://github.com/Giappo/mbd/blob/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/R/mbd_pure_multiple_birth.R#L110) *style:* **Place a space before left parenthesis, except in a function call.**
```r
      nu * choose(k[-length(k)], births) * q^births * (1 - q)^(k[-length(k)] - births)
                                                              ^
```
[R/mbd_pure_multiple_birth.R:111:1:](https://github.com/Giappo/mbd/blob/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/R/mbd_pure_multiple_birth.R#L111) *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:139:5:](https://github.com/Giappo/mbd/blob/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/R/mbd_pure_multiple_birth.R#L139) *style:* **Commented code should be removed.**
```r
  # cond <- 0
    ^~~~~~~~~
```
[R/mbd_pure_multiple_birth.R:145:1:](https://github.com/Giappo/mbd/blob/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/R/mbd_pure_multiple_birth.R#L145) *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:145:5:](https://github.com/Giappo/mbd/blob/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/R/mbd_pure_multiple_birth.R#L145) *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:151:33:](https://github.com/Giappo/mbd/blob/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/R/mbd_pure_multiple_birth.R#L151) *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:160:15:](https://github.com/Giappo/mbd/blob/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/R/mbd_pure_multiple_birth.R#L160) *warning:* **no visible global function definition for ‘pmb_loglik’**
```r
    loglik <- pmb_loglik(pars = pars1, brts = brts)
              ^~~~~~~~~~
```
[R/mbd_pure_multiple_birth.R:163:1:](https://github.com/Giappo/mbd/blob/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/R/mbd_pure_multiple_birth.R#L163) *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:173:1:](https://github.com/Giappo/mbd/blob/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/R/mbd_pure_multiple_birth.R#L173) *style:* **Variable or function name should be snake_case.**
```r
pmb_ML <- function(
^~~~~~
```
[R/mbd_pure_multiple_birth.R:182:17:](https://github.com/Giappo/mbd/blob/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/R/mbd_pure_multiple_birth.R#L182) *style:* **Only use double-quotes.**
```r
  optimmethod = 'simplex',
                ^~~~~~~~~
```
[R/mbd_pure_multiple_birth.R:187:1:](https://github.com/Giappo/mbd/blob/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/R/mbd_pure_multiple_birth.R#L187) *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:189:1:](https://github.com/Giappo/mbd/blob/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/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:190:1:](https://github.com/Giappo/mbd/blob/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/R/mbd_pure_multiple_birth.R#L190) *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:194:1:](https://github.com/Giappo/mbd/blob/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/R/mbd_pure_multiple_birth.R#L194) *style:* **Lines should not be more than 80 characters.**
```r
  namepars <- c("lambda", "mu", "nu", "q"); n_pars <- length(namepars); #if you add more parameters to your model just change this
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_pure_multiple_birth.R:195:1:](https://github.com/Giappo/mbd/blob/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/R/mbd_pure_multiple_birth.R#L195) *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:223:7:](https://github.com/Giappo/mbd/blob/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/R/mbd_pure_multiple_birth.R#L223) *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:224:19:](https://github.com/Giappo/mbd/blob/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/R/mbd_pure_multiple_birth.R#L224) *style:* **Use <-, not =, for assignment.**
```r
        trparsopt = initparsopt/(1 + initparsopt)
                  ^
```
[R/mbd_pure_multiple_birth.R:224:32:](https://github.com/Giappo/mbd/blob/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/R/mbd_pure_multiple_birth.R#L224) *style:* **Put spaces around all infix operators.**
```r
        trparsopt = initparsopt/(1 + initparsopt)
                              ~^~
```
[R/mbd_pure_multiple_birth.R:224:33:](https://github.com/Giappo/mbd/blob/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/R/mbd_pure_multiple_birth.R#L224) *style:* **Place a space before left parenthesis, except in a function call.**
```r
        trparsopt = initparsopt/(1 + initparsopt)
                                ^
```
[R/mbd_pure_multiple_birth.R:225:46:](https://github.com/Giappo/mbd/blob/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/R/mbd_pure_multiple_birth.R#L225) *style:* **Use <-, not =, for assignment.**
```r
        trparsopt[which(initparsopt == Inf)] = 1
                                             ^
```
[R/mbd_pure_multiple_birth.R:226:19:](https://github.com/Giappo/mbd/blob/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/R/mbd_pure_multiple_birth.R#L226) *style:* **Use <-, not =, for assignment.**
```r
        trparsfix = parsfix/(1 + parsfix)
                  ^
```
[R/mbd_pure_multiple_birth.R:226:28:](https://github.com/Giappo/mbd/blob/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/R/mbd_pure_multiple_birth.R#L226) *style:* **Put spaces around all infix operators.**
```r
        trparsfix = parsfix/(1 + parsfix)
                          ~^~
```
[R/mbd_pure_multiple_birth.R:226:29:](https://github.com/Giappo/mbd/blob/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/R/mbd_pure_multiple_birth.R#L226) *style:* **Place a space before left parenthesis, except in a function call.**
```r
        trparsfix = parsfix/(1 + parsfix)
                            ^
```
[R/mbd_pure_multiple_birth.R:227:42:](https://github.com/Giappo/mbd/blob/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/R/mbd_pure_multiple_birth.R#L227) *style:* **Use <-, not =, for assignment.**
```r
        trparsfix[which(parsfix == Inf)] = 1
                                         ^
```
[R/mbd_pure_multiple_birth.R:229:7:](https://github.com/Giappo/mbd/blob/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/R/mbd_pure_multiple_birth.R#L229) *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:233:17:](https://github.com/Giappo/mbd/blob/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/R/mbd_pure_multiple_birth.R#L233) *style:* **Use <-, not =, for assignment.**
```r
      optimpars = c(tol, maxiter)
                ^
```
[R/mbd_pure_multiple_birth.R:234:1:](https://github.com/Giappo/mbd/blob/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/R/mbd_pure_multiple_birth.R#L234) *style:* **Lines should not be more than 80 characters.**
```r
      initloglik <- pmb_loglik_choosepar(trparsopt = trparsopt, trparsfix = trparsfix, idparsopt = idparsopt,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_pure_multiple_birth.R:235:1:](https://github.com/Giappo/mbd/blob/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/R/mbd_pure_multiple_birth.R#L235) *style:* **Lines should not be more than 80 characters.**
```r
                                               idparsfix = idparsfix, brts = brts, soc = soc,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_pure_multiple_birth.R:236:1:](https://github.com/Giappo/mbd/blob/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/R/mbd_pure_multiple_birth.R#L236) *style:* **Lines should not be more than 80 characters.**
```r
                                               pars_transform = pars_transform) #there's no pars2 here and instead 3 more args at the end
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_pure_multiple_birth.R:237:1:](https://github.com/Giappo/mbd/blob/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/R/mbd_pure_multiple_birth.R#L237) *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:240:1:](https://github.com/Giappo/mbd/blob/9f822fba82c40bf9a4de7d3488dfd9c4870742e5/R/mbd_pure_multiple_birth.R#L240) *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")


修复D


@TonisOrmisson I may be wrong, indeed. I just remembered that this was working fine about 2 weeks ago and with the latest update it is now broken. You commit was the one which looked related since we used the end URL with quotas/completed URLs but it could of course have been a totally different code change causing the problem.
Any ideas/fixes?


Sorry, this line is shown in the view... not sure how to edit now.
This needs to be removed before committing. thank you!!


tedt


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

* https://cafe.ethtective.com


wooooow


Novice errors...  I took an arbitrary Portfile that looked suitable, then massaged it.

Fixed in a https://github.com/macports/macports-ports/pull/2653 – thanks for the review.


arbaz is stupid


These are my words but i expect something like this, `After the signature is drawn, the save and reset buttons are shown purposely to save or reset/clear the signature pad`


Why did u rename this?


legends are born in june