[R/default_params_doc.R:17:67:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/default_params_doc.R#L17) *style:* **Trailing whitespace is superfluous.**
```r
#' @param cond Set 1 if you want to condition on stem or crown age
                                                                  ^
```
[R/default_params_doc.R:21:70:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/default_params_doc.R#L21) *style:* **Trailing whitespace is superfluous.**
```r
#' @param idparsopt The ids of the parameters that must be optimized.
                                                                     ^
```
[R/default_params_doc.R:49:18:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/default_params_doc.R#L49) *style:* **Trailing whitespace is superfluous.**
```r
#' @param methode
                 ^
```
[R/default_params_doc.R:52:44:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/default_params_doc.R#L52) *style:* **Trailing whitespace is superfluous.**
```r
#'     \item \code{sexpm}: use \code{sexpm}
                                           ^
```
[R/default_params_doc.R:53:46:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/default_params_doc.R#L53) *style:* **Trailing whitespace is superfluous.**
```r
#'     \item \code{expo}: use \code{expoRkit}
                                             ^
```
[R/default_params_doc.R:57:1:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/default_params_doc.R#L57) *style:* **Lines should not be more than 80 characters.**
```r
#' @param missnumspec The number of species that are in the clade but missing in the phylogeny.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/default_params_doc.R:90:28:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/default_params_doc.R#L90) *style:* **Trailing whitespace is superfluous.**
```r
#' @param results something
                           ^
```
[R/default_params_doc.R:109:62:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/default_params_doc.R#L109) *style:* **Trailing whitespace is superfluous.**
```r
#'   You can also define the tips_interval as you can usually
                                                             ^
```
[R/default_params_doc.R:126:47:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/default_params_doc.R#L126) *style:* **Trailing whitespace is superfluous.**
```r
#' @author Documentation by Giovanni Laudanno,
                                              ^
```
[R/default_params_doc.R:147:17:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/default_params_doc.R#L147) *style:* **Trailing whitespace is superfluous.**
```r
  function_name,
                ^
```
[R/default_params_doc.R:175:3:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/default_params_doc.R#L175) *style:* **Variable or function name should be snake_case.**
```r
  N,
  ^
```
[R/default_params_doc.R:176:3:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/default_params_doc.R#L176) *style:* **Variable or function name should be snake_case.**
```r
  N0,
  ^~
```
[R/default_params_doc.R:186:11:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/default_params_doc.R#L186) *style:* **Trailing whitespace is superfluous.**
```r
  printit,
          ^
```
[R/default_params_doc.R:187:3:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/default_params_doc.R#L187) *style:* **Variable or function name should be snake_case.**
```r
  Q,
  ^
```
[R/default_params_doc.R:190:13:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/default_params_doc.R#L190) *style:* **Trailing whitespace is superfluous.**
```r
  recursive,
            ^
```
[R/default_params_doc.R:193:11:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/default_params_doc.R#L193) *style:* **Trailing whitespace is superfluous.**
```r
  results,
          ^
```
[R/default_params_doc.R:214:3:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/default_params_doc.R#L214) *style:* **Variable or function name should be snake_case.**
```r
  x.name,
  ^~~~~~
```
[R/default_params_doc.R:215:3:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/default_params_doc.R#L215) *style:* **Variable or function name should be snake_case.**
```r
  x.splits,
  ^~~~~~~~
```
[R/default_params_doc.R:217:3:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/default_params_doc.R#L217) *style:* **Variable or function name should be snake_case.**
```r
  y.name,
  ^~~~~~
```
[R/default_params_doc.R:218:3:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/default_params_doc.R#L218) *style:* **Variable or function name should be snake_case.**
```r
  y.splits,
  ^~~~~~~~
```
[R/default_params_doc.R:220:3:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/default_params_doc.R#L220) *style:* **Variable or function name should be snake_case.**
```r
  z.name
  ^~~~~~
```
[R/mbd_loglik_choosepar.R:8:13:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_choosepar.R#L8) *style:* **Trailing whitespace is superfluous.**
```r
  trparsopt,
            ^
```
[R/mbd_loglik_choosepar.R:9:13:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_choosepar.R#L9) *style:* **Trailing whitespace is superfluous.**
```r
  trparsfix,
            ^
```
[R/mbd_loglik_choosepar.R:11:33:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_choosepar.R#L11) *style:* **Trailing whitespace is superfluous.**
```r
  idparsfix = (1:4)[-idparsopt],
                                ^
```
[R/mbd_loglik_choosepar.R:12:8:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_choosepar.R#L12) *style:* **Trailing whitespace is superfluous.**
```r
  brts,
       ^
```
[R/mbd_loglik_choosepar.R:13:12:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_choosepar.R#L13) *style:* **Trailing whitespace is superfluous.**
```r
  cond = 1,
           ^
```
[R/mbd_loglik_choosepar.R:15:29:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_choosepar.R#L15) *style:* **Trailing whitespace is superfluous.**
```r
  tips_interval = c(0, Inf),
                            ^
```
[R/mbd_loglik_choosepar.R:16:19:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_choosepar.R#L16) *style:* **Trailing whitespace is superfluous.**
```r
  missnumspec = 0,
                  ^
```
[R/mbd_loglik_choosepar.R:18:31:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_choosepar.R#L18) *style:* **Trailing whitespace is superfluous.**
```r
  minimum_multiple_births = 0,
                              ^
```
[R/mbd_loglik_choosepar.R:19:22:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_choosepar.R#L19) *style:* **Trailing whitespace is superfluous.**
```r
  pars_transform = 0,
                     ^
```
[R/mbd_loglik_choosepar.R:20:20:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_choosepar.R#L20) *style:* **Trailing whitespace is superfluous.**
```r
  print_errors = 0,
                   ^
```
[R/mbd_loglik_choosepar.R:23:1:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_choosepar.R#L23) *style:* **Lines should not be more than 80 characters.**
```r
  #This function provides a likelihood for a subset of parameters. This is built to work inside mbd_minusLL_vs_single_parameter or any optimizer like simplex, optim or subplex
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_loglik_choosepar.R:28:1:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_choosepar.R#L28) *style:* **Trailing whitespace is superfluous.**
```r

^~
```
[R/mbd_loglik_choosepar.R:29:26:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_choosepar.R#L29) *style:* **Commas should always have a space after.**
```r
  namepars <- c("lambda","mu","nu","q"); Npars <- length(namepars);
                         ^
```
[R/mbd_loglik_choosepar.R:29:31:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_choosepar.R#L29) *style:* **Commas should always have a space after.**
```r
  namepars <- c("lambda","mu","nu","q"); Npars <- length(namepars);
                              ^
```
[R/mbd_loglik_choosepar.R:29:36:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_choosepar.R#L29) *style:* **Commas should always have a space after.**
```r
  namepars <- c("lambda","mu","nu","q"); Npars <- length(namepars);
                                   ^
```
[R/mbd_loglik_choosepar.R:29:42:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_choosepar.R#L29) *style:* **Variable or function name should be snake_case.**
```r
  namepars <- c("lambda","mu","nu","q"); Npars <- length(namepars);
                                         ^~~~~
```
[R/mbd_loglik_choosepar.R:30:52:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_choosepar.R#L30) *style:* **Opening curly braces should never go on their own line and should always be followed by a new line.**
```r
  if (length(trparsopt) == 4 && missing(trparsfix)){trparsfix <- NULL}
                                                   ^
```
[R/mbd_loglik_choosepar.R:30:70:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_choosepar.R#L30) *style:* **Closing curly-braces should always be on their own line, unless it's followed by an else.**
```r
  if (length(trparsopt) == 4 && missing(trparsfix)){trparsfix <- NULL}
                                                                     ^
```
[R/mbd_loglik_choosepar.R:31:11:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_choosepar.R#L31) *style:* **Use <-, not =, for assignment.**
```r
  trpars1 = rep(0, Npars)
          ^
```
[R/mbd_loglik_choosepar.R:34:3:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_choosepar.R#L34) *style:* **Opening curly braces should never go on their own line and should always be followed by a new line.**
```r
  {
  ^
```
[R/mbd_loglik_choosepar.R:37:7:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_choosepar.R#L37) *style:* **Do not place spaces around code in parentheses or square brackets.**
```r
  if ( min(trpars1[1:Npars]) < 0 ){loglik <- -Inf}else
      ^
```
[R/mbd_loglik_choosepar.R:37:33:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_choosepar.R#L37) *style:* **Do not place spaces around code in parentheses or square brackets.**
```r
  if ( min(trpars1[1:Npars]) < 0 ){loglik <- -Inf}else
                                ^
```
[R/mbd_loglik_choosepar.R:37:35:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_choosepar.R#L37) *style:* **Opening curly braces should never go on their own line and should always be followed by a new line.**
```r
  if ( min(trpars1[1:Npars]) < 0 ){loglik <- -Inf}else
                                  ^
```
[R/mbd_loglik_choosepar.R:37:50:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_choosepar.R#L37) *style:* **Closing curly-braces should always be on their own line, unless it's followed by an else.**
```r
  if ( min(trpars1[1:Npars]) < 0 ){loglik <- -Inf}else
                                                 ^
```
[R/mbd_loglik_choosepar.R:38:3:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_choosepar.R#L38) *style:* **Opening curly braces should never go on their own line and should always be followed by a new line.**
```r
  {
  ^
```
[R/mbd_loglik_choosepar.R:40:5:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_choosepar.R#L40) *style:* **Opening curly braces should never go on their own line and should always be followed by a new line.**
```r
    {
    ^
```
[R/mbd_loglik_choosepar.R:42:13:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_choosepar.R#L42) *style:* **Use <-, not =, for assignment.**
```r
      pars1 = trpars1/(1 - trpars1)
            ^
```
[R/mbd_loglik_choosepar.R:42:22:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_choosepar.R#L42) *style:* **Put spaces around all infix operators.**
```r
      pars1 = trpars1/(1 - trpars1)
                    ~^~
```
[R/mbd_loglik_choosepar.R:42:23:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_choosepar.R#L42) *style:* **Place a space before left parenthesis, except in a function call.**
```r
      pars1 = trpars1/(1 - trpars1)
                      ^
```
[R/mbd_loglik_choosepar.R:44:5:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_choosepar.R#L44) *style:* **Opening curly braces should never go on their own line and should always be followed by a new line.**
```r
    {
    ^
```
[R/mbd_loglik_choosepar.R:48:20:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_choosepar.R#L48) *style:* **Trailing whitespace is superfluous.**
```r
      pars = pars1,
                   ^
```
[R/mbd_loglik_choosepar.R:49:19:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_choosepar.R#L49) *style:* **Trailing whitespace is superfluous.**
```r
      brts = brts,
                  ^
```
[R/mbd_loglik_choosepar.R:50:19:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_choosepar.R#L50) *style:* **Trailing whitespace is superfluous.**
```r
      cond = cond,
                  ^
```
[R/mbd_loglik_choosepar.R:52:37:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_choosepar.R#L52) *style:* **Trailing whitespace is superfluous.**
```r
      tips_interval = tips_interval,
                                    ^
```
[R/mbd_loglik_choosepar.R:54:57:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_choosepar.R#L54) *style:* **Trailing whitespace is superfluous.**
```r
      minimum_multiple_births = minimum_multiple_births,
                                                        ^
```
[R/mbd_loglik_choosepar.R:55:35:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_choosepar.R#L55) *style:* **Trailing whitespace is superfluous.**
```r
      print_errors = print_errors,
                                  ^
```
[R/mbd_loglik_choosepar.R:60:3:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_choosepar.R#L60) *style:* **Opening curly braces should never go on their own line and should always be followed by a new line.**
```r
  {
  ^
```
[R/mbd_loglik_choosepar.R:61:1:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_choosepar.R#L61) *style:* **Lines should not be more than 80 characters.**
```r
    cat("There are parameter values used which cause numerical problems:",trpars1,"\n")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_loglik_choosepar.R:61:75:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_choosepar.R#L61) *style:* **Commas should always have a space after.**
```r
    cat("There are parameter values used which cause numerical problems:",trpars1,"\n")
                                                                          ^
```
[R/mbd_loglik_choosepar.R:61:83:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_choosepar.R#L61) *style:* **Commas should always have a space after.**
```r
    cat("There are parameter values used which cause numerical problems:",trpars1,"\n")
                                                                                ^
```
[R/mbd_loglik_utils.R:5:1:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L5) *style:* **Lines should not be more than 80 characters.**
```r
hyperA_HannoX <- function(N, k, q) {# HG function: fast O(N), updated after Moulis meeting
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_loglik_utils.R:5:1:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L5) *style:* **Variable or function name should be snake_case.**
```r
hyperA_HannoX <- function(N, k, q) {# HG function: fast O(N), updated after Moulis meeting
^~~~~~~~~~~~~
```
[R/mbd_loglik_utils.R:5:27:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L5) *style:* **Variable or function name should be snake_case.**
```r
hyperA_HannoX <- function(N, k, q) {# HG function: fast O(N), updated after Moulis meeting
                          ^
```
[R/mbd_loglik_utils.R:5:36:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L5) *style:* **Opening curly braces should never go on their own line and should always be followed by a new line.**
```r
hyperA_HannoX <- function(N, k, q) {# HG function: fast O(N), updated after Moulis meeting
                                   ^
```
[R/mbd_loglik_utils.R:7:1:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L7) *style:* **Lines should not be more than 80 characters.**
```r
  #it produces the structure q^(m-n)*(1-q)^(k+2*n-m)*sum_j 2^j choose(k,j)*choose(n,m-n-j)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_loglik_utils.R:9:3:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L9) *style:* **Variable or function name should be snake_case.**
```r
  A1 <- (1-q)^(k) * choose(k, j) * (2)^j
  ^~
```
[R/mbd_loglik_utils.R:9:11:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L9) *style:* **Put spaces around all infix operators.**
```r
  A1 <- (1-q)^(k) * choose(k, j) * (2)^j
         ~^~
```
[R/mbd_loglik_utils.R:9:15:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L9) *style:* **Place a space before left parenthesis, except in a function call.**
```r
  A1 <- (1-q)^(k) * choose(k, j) * (2)^j
              ^
```
[R/mbd_loglik_utils.R:10:3:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L10) *style:* **Variable or function name should be snake_case.**
```r
  N <- N + 1
  ^
```
[R/mbd_loglik_utils.R:11:3:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L11) *style:* **Variable or function name should be snake_case.**
```r
  A <- diag(A1[1], nrow=N+2, ncol=N+2)
  ^
```
[R/mbd_loglik_utils.R:11:24:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L11) *style:* **Put spaces around all infix operators.**
```r
  A <- diag(A1[1], nrow=N+2, ncol=N+2)
                      ~^~
```
[R/mbd_loglik_utils.R:11:26:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L11) *style:* **Put spaces around all infix operators.**
```r
  A <- diag(A1[1], nrow=N+2, ncol=N+2)
                        ~^~
```
[R/mbd_loglik_utils.R:11:34:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L11) *style:* **Put spaces around all infix operators.**
```r
  A <- diag(A1[1], nrow=N+2, ncol=N+2)
                                ~^~
```
[R/mbd_loglik_utils.R:11:36:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L11) *style:* **Put spaces around all infix operators.**
```r
  A <- diag(A1[1], nrow=N+2, ncol=N+2)
                                  ~^~
```
[R/mbd_loglik_utils.R:12:9:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L12) *style:* **Put spaces around all infix operators.**
```r
  A[1:(k+1),1] <- A1
       ~^~
```
[R/mbd_loglik_utils.R:12:13:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L12) *style:* **Commas should always have a space after.**
```r
  A[1:(k+1),1] <- A1
            ^
```
[R/mbd_loglik_utils.R:15:20:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L15) *style:* **Commas should always have a space after.**
```r
    s <- src:min(N,2*src+k-1)
                   ^
```
[R/mbd_loglik_utils.R:15:21:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L15) *style:* **Put spaces around all infix operators.**
```r
    s <- src:min(N,2*src+k-1)
                   ~^~
```
[R/mbd_loglik_utils.R:15:25:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L15) *style:* **Put spaces around all infix operators.**
```r
    s <- src:min(N,2*src+k-1)
                       ~^~
```
[R/mbd_loglik_utils.R:15:27:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L15) *style:* **Put spaces around all infix operators.**
```r
    s <- src:min(N,2*src+k-1)
                         ~^~
```
[R/mbd_loglik_utils.R:16:8:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L16) *style:* **Put spaces around all infix operators.**
```r
    A[s+2,dst] <- A[s,src] + A[s+1,src]
      ~^~
```
[R/mbd_loglik_utils.R:16:11:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L16) *style:* **Commas should always have a space after.**
```r
    A[s+2,dst] <- A[s,src] + A[s+1,src]
          ^
```
[R/mbd_loglik_utils.R:16:23:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L16) *style:* **Commas should always have a space after.**
```r
    A[s+2,dst] <- A[s,src] + A[s+1,src]
                      ^
```
[R/mbd_loglik_utils.R:16:33:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L16) *style:* **Put spaces around all infix operators.**
```r
    A[s+2,dst] <- A[s,src] + A[s+1,src]
                               ~^~
```
[R/mbd_loglik_utils.R:16:36:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L16) *style:* **Commas should always have a space after.**
```r
    A[s+2,dst] <- A[s,src] + A[s+1,src]
                                   ^
```
[R/mbd_loglik_utils.R:17:11:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L17) *style:* **Put spaces around all infix operators.**
```r
    m <- s-1; n <- src-1;
         ~^~
```
[R/mbd_loglik_utils.R:17:23:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L17) *style:* **Put spaces around all infix operators.**
```r
    m <- s-1; n <- src-1;
                     ~^~
```
[R/mbd_loglik_utils.R:18:9:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L18) *style:* **Commas should always have a space after.**
```r
    A[s,src] <- A[s,src] * q^(m-n)*(1-q)^(2*n-m)
        ^
```
[R/mbd_loglik_utils.R:18:21:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L18) *style:* **Commas should always have a space after.**
```r
    A[s,src] <- A[s,src] * q^(m-n)*(1-q)^(2*n-m)
                    ^
```
[R/mbd_loglik_utils.R:18:30:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L18) *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:18:32:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L18) *style:* **Put spaces around all infix operators.**
```r
    A[s,src] <- A[s,src] * q^(m-n)*(1-q)^(2*n-m)
                              ~^~
```
[R/mbd_loglik_utils.R:18:35:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L18) *style:* **Put spaces around all infix operators.**
```r
    A[s,src] <- A[s,src] * q^(m-n)*(1-q)^(2*n-m)
                                 ~^~
```
[R/mbd_loglik_utils.R:18:36:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L18) *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:18:38:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L18) *style:* **Put spaces around all infix operators.**
```r
    A[s,src] <- A[s,src] * q^(m-n)*(1-q)^(2*n-m)
                                    ~^~
```
[R/mbd_loglik_utils.R:18:42:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L18) *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:18:44:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L18) *style:* **Put spaces around all infix operators.**
```r
    A[s,src] <- A[s,src] * q^(m-n)*(1-q)^(2*n-m)
                                          ~^~
```
[R/mbd_loglik_utils.R:18:46:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L18) *style:* **Put spaces around all infix operators.**
```r
    A[s,src] <- A[s,src] * q^(m-n)*(1-q)^(2*n-m)
                                            ~^~
```
[R/mbd_loglik_utils.R:20:7:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L20) *style:* **Commas should always have a space after.**
```r
  A[N,N] = A[N,N] * (1-q)^(N-1);
      ^
```
[R/mbd_loglik_utils.R:20:10:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L20) *style:* **Use <-, not =, for assignment.**
```r
  A[N,N] = A[N,N] * (1-q)^(N-1);
         ^
```
[R/mbd_loglik_utils.R:20:16:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L20) *style:* **Commas should always have a space after.**
```r
  A[N,N] = A[N,N] * (1-q)^(N-1);
               ^
```
[R/mbd_loglik_utils.R:20:23:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L20) *style:* **Put spaces around all infix operators.**
```r
  A[N,N] = A[N,N] * (1-q)^(N-1);
                     ~^~
```
[R/mbd_loglik_utils.R:20:27:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L20) *style:* **Place a space before left parenthesis, except in a function call.**
```r
  A[N,N] = A[N,N] * (1-q)^(N-1);
                          ^
```
[R/mbd_loglik_utils.R:20:29:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L20) *style:* **Put spaces around all infix operators.**
```r
  A[N,N] = A[N,N] * (1-q)^(N-1);
                           ~^~
```
[R/mbd_loglik_utils.R:21:9:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L21) *style:* **Commas should always have a space after.**
```r
  A[1:N,1:N]
        ^
```
[R/mbd_loglik_utils.R:24:3:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L24) *style:* **Commented code should be removed.**
```r
# if (.Platform$OS.type=="windows"){matrix_builder = hyperA:::hyperA}
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_loglik_utils.R:25:1:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L25) *style:* **Lines should not be more than 80 characters.**
```r
# if (.Platform$OS.type=="unix")   {matrix_builder = hyperA_HannoX} #this is set to work with home directory of the cluster
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_loglik_utils.R:25:3:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L25) *style:* **Commented code should be removed.**
```r
# if (.Platform$OS.type=="unix")   {matrix_builder = hyperA_HannoX} #this is set to work with home directory of the cluster
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_loglik_utils.R:31:1:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L31) *style:* **Lines should not be more than 80 characters.**
```r
create_A0 <- function(max_number_of_species, lambda, mu, q, k, matrix_builder = hyperA_HannoX){
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_loglik_utils.R:31:1:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L31) *style:* **Variable or function name should be snake_case.**
```r
create_A0 <- function(max_number_of_species, lambda, mu, q, k, matrix_builder = hyperA_HannoX){
^~~~~~~~~
```
[R/mbd_loglik_utils.R:32:8:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L32) *style:* **Use <-, not =, for assignment.**
```r
  nvec = 0:max_number_of_species
       ^
```
[R/mbd_loglik_utils.R:33:3:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L33) *style:* **Variable or function name should be snake_case.**
```r
  M = lambda * matrix_builder(N = max_number_of_species, k = k, q = q)
  ^
```
[R/mbd_loglik_utils.R:33:5:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L33) *style:* **Use <-, not =, for assignment.**
```r
  M = lambda * matrix_builder(N = max_number_of_species, k = k, q = q)
    ^
```
[R/mbd_loglik_utils.R:35:1:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L35) *style:* **Lines should not be more than 80 characters.**
```r
  # diag(M) = (-lambda)*c( (1-(1-q)^(k+( nvec[1:max_number_of_species] ) )),0 ) - mu*(nvec+k)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_loglik_utils.R:35:5:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L35) *style:* **Commented code should be removed.**
```r
  # diag(M) = (-lambda)*c( (1-(1-q)^(k+( nvec[1:max_number_of_species] ) )),0 ) - mu*(nvec+k)
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_loglik_utils.R:36:1:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L36) *style:* **Lines should not be more than 80 characters.**
```r
  diag(M) = (-lambda) * ( 1 - (1 - q)^(k + nvec) ) - mu * (nvec + k) #new version to avoid the dumpster problem at the end of the matrix
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_loglik_utils.R:36:11:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L36) *style:* **Use <-, not =, for assignment.**
```r
  diag(M) = (-lambda) * ( 1 - (1 - q)^(k + nvec) ) - mu * (nvec + k) #new version to avoid the dumpster problem at the end of the matrix
          ^
```
[R/mbd_loglik_utils.R:36:26:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L36) *style:* **Do not place spaces around code in parentheses or square brackets.**
```r
  diag(M) = (-lambda) * ( 1 - (1 - q)^(k + nvec) ) - mu * (nvec + k) #new version to avoid the dumpster problem at the end of the matrix
                         ^
```
[R/mbd_loglik_utils.R:36:39:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L36) *style:* **Place a space before left parenthesis, except in a function call.**
```r
  diag(M) = (-lambda) * ( 1 - (1 - q)^(k + nvec) ) - mu * (nvec + k) #new version to avoid the dumpster problem at the end of the matrix
                                      ^
```
[R/mbd_loglik_utils.R:36:49:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L36) *style:* **Do not place spaces around code in parentheses or square brackets.**
```r
  diag(M) = (-lambda) * ( 1 - (1 - q)^(k + nvec) ) - mu * (nvec + k) #new version to avoid the dumpster problem at the end of the matrix
                                                ^
```
[R/mbd_loglik_utils.R:38:27:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L38) *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:46:1:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L46) *style:* **Lines should not be more than 80 characters.**
```r
create_B0 <- function(max_number_of_species, q, k, b, matrix_builder = hyperA_HannoX){#lambda * choose(k,b) * q^b  is going to be added in logB in the main script
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_loglik_utils.R:46:1:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L46) *style:* **Variable or function name should be snake_case.**
```r
create_B0 <- function(max_number_of_species, q, k, b, matrix_builder = hyperA_HannoX){#lambda * choose(k,b) * q^b  is going to be added in logB in the main script
^~~~~~~~~
```
[R/mbd_loglik_utils.R:46:86:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L46) *style:* **Opening curly braces should never go on their own line and should always be followed by a new line.**
```r
create_B0 <- function(max_number_of_species, q, k, b, matrix_builder = hyperA_HannoX){#lambda * choose(k,b) * q^b  is going to be added in logB in the main script
                                                                                ^
```
[R/mbd_loglik_utils.R:48:3:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L48) *style:* **Variable or function name should be snake_case.**
```r
  B <- matrix_builder(N = max_number_of_species, k = k2, q = q)
  ^
```
[R/mbd_loglik_utils.R:57:1:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L57) *style:* **Variable or function name should be snake_case.**
```r
create_A <- function(lambda, mu, nu, q, k, max_number_of_species){
^~~~~~~~
```
[R/mbd_loglik_utils.R:59:3:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L59) *style:* **Variable or function name should be snake_case.**
```r
  M <- create_A0(max_number_of_species = max_number_of_species,
  ^
```
[R/mbd_loglik_utils.R:61:1:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L61) *style:* **Lines should not be more than 80 characters.**
```r
  M[row(M) == col(M) + 1] <- M[row(M) == col(M) + 1] + lambda * (nvec[1:(max_number_of_species)]+2*k)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_loglik_utils.R:61:97:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L61) *style:* **Put spaces around all infix operators.**
```r
  M[row(M) == col(M) + 1] <- M[row(M) == col(M) + 1] + lambda * (nvec[1:(max_number_of_species)]+2*k)
                                                                                ~^~
```
[R/mbd_loglik_utils.R:61:99:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L61) *style:* **Put spaces around all infix operators.**
```r
  M[row(M) == col(M) + 1] <- M[row(M) == col(M) + 1] + lambda * (nvec[1:(max_number_of_species)]+2*k)
                                                                                ~^~
```
[R/mbd_loglik_utils.R:63:1:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L63) *style:* **Lines should not be more than 80 characters.**
```r
  # M[row(M) == col(M)] = M[row(M) == col(M)] - c(lambda*(nvec[-length(nvec)]+k),0)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_loglik_utils.R:63:5:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L63) *style:* **Commented code should be removed.**
```r
  # M[row(M) == col(M)] = M[row(M) == col(M)] - c(lambda*(nvec[-length(nvec)]+k),0)
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_loglik_utils.R:64:1:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L64) *style:* **Lines should not be more than 80 characters.**
```r
  M[row(M) == col(M)] <- M[row(M) == col(M)] - lambda * (nvec + k) #new version to avoid the dumpster problem at the end of the matrix
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_loglik_utils.R:74:1:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L74) *style:* **Variable or function name should be snake_case.**
```r
create_B <- function(lambda, nu, q, k, b, max_number_of_species){
^~~~~~~~
```
[R/mbd_loglik_utils.R:75:1:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L75) *style:* **Lines should not be more than 80 characters.**
```r
  M <- create_B0(max_number_of_species = max_number_of_species, q = q, k = k, b = b)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_loglik_utils.R:75:3:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L75) *style:* **Variable or function name should be snake_case.**
```r
  M <- create_B0(max_number_of_species = max_number_of_species, q = q, k = k, b = b)
  ^
```
[R/mbd_loglik_utils.R:75:8:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L75) *warning:* **no visible global function definition for ‘create_B0’**
```r
  M <- create_B0(max_number_of_species = max_number_of_species, q = q, k = k, b = b)
       ^~~~~~~~~
```
[R/mbd_loglik_utils.R:76:1:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L76) *style:* **Lines should not be more than 80 characters.**
```r
  B <- lambda * k * diag(max_number_of_species + 1) * (b == 1) + nu * choose(k, b) * (q^b) * M
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_loglik_utils.R:76:3:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L76) *style:* **Variable or function name should be snake_case.**
```r
  B <- lambda * k * diag(max_number_of_species + 1) * (b == 1) + nu * choose(k, b) * (q^b) * M
  ^
```
[R/mbd_loglik_utils.R:85:1:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L85) *style:* **Variable or function name should be snake_case.**
```r
create_A.no_mbd = function(
^~~~~~~~~~~~~~~
```
[R/mbd_loglik_utils.R:85:17:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L85) *style:* **Use <-, not =, for assignment.**
```r
create_A.no_mbd = function(
                ^
```
[R/mbd_loglik_utils.R:95:1:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L95) *style:* **Lines should not be more than 80 characters.**
```r
  M <- create_A0(max_number_of_species = max_number_of_species,lambda = nu,mu = mu,q = q,k = k)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_loglik_utils.R:95:3:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L95) *style:* **Variable or function name should be snake_case.**
```r
  M <- create_A0(max_number_of_species = max_number_of_species,lambda = nu,mu = mu,q = q,k = k)
  ^
```
[R/mbd_loglik_utils.R:95:8:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L95) *warning:* **no visible global function definition for ‘create_A0’**
```r
  M <- create_A0(max_number_of_species = max_number_of_species,lambda = nu,mu = mu,q = q,k = k)
       ^~~~~~~~~
```
[R/mbd_loglik_utils.R:95:64:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L95) *style:* **Commas should always have a space after.**
```r
  M <- create_A0(max_number_of_species = max_number_of_species,lambda = nu,mu = mu,q = q,k = k)
                                                               ^
```
[R/mbd_loglik_utils.R:95:76:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L95) *style:* **Commas should always have a space after.**
```r
  M <- create_A0(max_number_of_species = max_number_of_species,lambda = nu,mu = mu,q = q,k = k)
                                                                           ^
```
[R/mbd_loglik_utils.R:95:84:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L95) *style:* **Commas should always have a space after.**
```r
  M <- create_A0(max_number_of_species = max_number_of_species,lambda = nu,mu = mu,q = q,k = k)
                                                                                ^
```
[R/mbd_loglik_utils.R:95:90:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L95) *style:* **Commas should always have a space after.**
```r
  M <- create_A0(max_number_of_species = max_number_of_species,lambda = nu,mu = mu,q = q,k = k)
                                                                                ^
```
[R/mbd_loglik_utils.R:96:1:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L96) *style:* **Lines should not be more than 80 characters.**
```r
  M[row(M) == col(M) + 1] <- M[row(M) == col(M) + 1] + lambda * (nvec[1:(max_number_of_species)]+2*k)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_loglik_utils.R:96:97:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L96) *style:* **Put spaces around all infix operators.**
```r
  M[row(M) == col(M) + 1] <- M[row(M) == col(M) + 1] + lambda * (nvec[1:(max_number_of_species)]+2*k)
                                                                                ~^~
```
[R/mbd_loglik_utils.R:96:99:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L96) *style:* **Put spaces around all infix operators.**
```r
  M[row(M) == col(M) + 1] <- M[row(M) == col(M) + 1] + lambda * (nvec[1:(max_number_of_species)]+2*k)
                                                                                ~^~
```
[R/mbd_loglik_utils.R:97:1:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L97) *style:* **Lines should not be more than 80 characters.**
```r
  M[row(M) == col(M)]     <- M[row(M) == col(M)] - c(lambda * (nvec[-length(nvec)] + k), 0)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_loglik_utils.R:107:1:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L107) *style:* **Lines should not be more than 80 characters.**
```r
create_B.no_mbd = function(lambda,nu,q,k,b,max_number_of_species,minimum_multiple_births){
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_loglik_utils.R:107:1:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L107) *style:* **Variable or function name should be snake_case.**
```r
create_B.no_mbd = function(lambda,nu,q,k,b,max_number_of_species,minimum_multiple_births){
^~~~~~~~~~~~~~~
```
[R/mbd_loglik_utils.R:107:17:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L107) *style:* **Use <-, not =, for assignment.**
```r
create_B.no_mbd = function(lambda,nu,q,k,b,max_number_of_species,minimum_multiple_births){
                ^
```
[R/mbd_loglik_utils.R:107:35:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L107) *style:* **Commas should always have a space after.**
```r
create_B.no_mbd = function(lambda,nu,q,k,b,max_number_of_species,minimum_multiple_births){
                                  ^
```
[R/mbd_loglik_utils.R:107:38:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L107) *style:* **Commas should always have a space after.**
```r
create_B.no_mbd = function(lambda,nu,q,k,b,max_number_of_species,minimum_multiple_births){
                                     ^
```
[R/mbd_loglik_utils.R:107:40:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L107) *style:* **Commas should always have a space after.**
```r
create_B.no_mbd = function(lambda,nu,q,k,b,max_number_of_species,minimum_multiple_births){
                                       ^
```
[R/mbd_loglik_utils.R:107:42:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L107) *style:* **Commas should always have a space after.**
```r
create_B.no_mbd = function(lambda,nu,q,k,b,max_number_of_species,minimum_multiple_births){
                                         ^
```
[R/mbd_loglik_utils.R:107:44:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L107) *style:* **Commas should always have a space after.**
```r
create_B.no_mbd = function(lambda,nu,q,k,b,max_number_of_species,minimum_multiple_births){
                                           ^
```
[R/mbd_loglik_utils.R:107:66:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L107) *style:* **Commas should always have a space after.**
```r
create_B.no_mbd = function(lambda,nu,q,k,b,max_number_of_species,minimum_multiple_births){
                                                                 ^
```
[R/mbd_loglik_utils.R:108:1:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L108) *style:* **Lines should not be more than 80 characters.**
```r
  M <- create_B0(max_number_of_species = max_number_of_species, q = q, k = k, b = b)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_loglik_utils.R:108:3:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L108) *style:* **Variable or function name should be snake_case.**
```r
  M <- create_B0(max_number_of_species = max_number_of_species, q = q, k = k, b = b)
  ^
```
[R/mbd_loglik_utils.R:108:8:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L108) *warning:* **no visible global function definition for ‘create_B0’**
```r
  M <- create_B0(max_number_of_species = max_number_of_species, q = q, k = k, b = b)
       ^~~~~~~~~
```
[R/mbd_loglik_utils.R:109:1:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L109) *style:* **Lines should not be more than 80 characters.**
```r
  B <- lambda * k * diag(max_number_of_species + 1) * (b == 1) + nu * choose(k,b) * (q^b) * M
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_loglik_utils.R:109:3:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L109) *style:* **Variable or function name should be snake_case.**
```r
  B <- lambda * k * diag(max_number_of_species + 1) * (b == 1) + nu * choose(k,b) * (q^b) * M
  ^
```
[R/mbd_loglik_utils.R:109:80:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L109) *style:* **Commas should always have a space after.**
```r
  B <- lambda * k * diag(max_number_of_species + 1) * (b == 1) + nu * choose(k,b) * (q^b) * M
                                                                               ^
```
[R/mbd_loglik_utils.R:110:48:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L110) *style:* **Use <-, not =, for assignment.**
```r
  B[row(B) > col(B) + minimum_multiple_births] = 0
                                               ^
```
[R/mbd_loglik_utils.R:119:1:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L119) *style:* **Variable or function name should be snake_case.**
```r
A_operator <- function(Q, transition_matrix, time_interval, precision = 50L,
^~~~~~~~~~
```
[R/mbd_loglik_utils.R:119:24:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L119) *style:* **Variable or function name should be snake_case.**
```r
A_operator <- function(Q, transition_matrix, time_interval, precision = 50L,
                       ^
```
[R/mbd_loglik_utils.R:121:1:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L121) *style:* **Trailing whitespace is superfluous.**
```r

^~
```
[R/mbd_loglik_utils.R:128:1:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L128) *style:* **Trailing whitespace is superfluous.**
```r

^~
```
[R/mbd_loglik_utils.R:130:3:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L130) *style:* **Opening curly braces should never go on their own line and should always be followed by a new line.**
```r
  {
  ^
```
[R/mbd_loglik_utils.R:132:7:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L132) *style:* **Commented code should be removed.**
```r
    # exp_matrix <- rsexpm:::sexpm(transition_matrix * time_interval)
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_loglik_utils.R:133:7:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L133) *style:* **Commented code should be removed.**
```r
    # result     <- exp_matrix %*% Q
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_loglik_utils.R:135:1:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L135) *style:* **Trailing whitespace is superfluous.**
```r

^~
```
[R/mbd_loglik_utils.R:137:3:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L137) *style:* **Opening curly braces should never go on their own line and should always be followed by a new line.**
```r
  {
  ^
```
[R/mbd_loglik_utils.R:138:5:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L138) *style:* **Variable or function name should be snake_case.**
```r
    result.nan <- result.negative <- 1
    ^~~~~~~~~~
```
[R/mbd_loglik_utils.R:138:19:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L138) *style:* **Variable or function name should be snake_case.**
```r
    result.nan <- result.negative <- 1
                  ^~~~~~~~~~~~~~~
```
[R/mbd_loglik_utils.R:140:1:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L140) *style:* **Lines should not be more than 80 characters.**
```r
    while ((result.nan == 1| result.negative == 1) & repetition < max_repetitions)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_loglik_utils.R:140:28:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L140) *style:* **Put spaces around all infix operators.**
```r
    while ((result.nan == 1| result.negative == 1) & repetition < max_repetitions)
                          ~^
```
[R/mbd_loglik_utils.R:141:5:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L141) *style:* **Opening curly braces should never go on their own line and should always be followed by a new line.**
```r
    {
    ^
```
[R/mbd_loglik_utils.R:142:1:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L142) *style:* **Lines should not be more than 80 characters.**
```r
      result <- try(expoRkit::expv(v = Q, x = transition_matrix, t = time_interval, m = precision), silent = TRUE)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_loglik_utils.R:143:1:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L143) *style:* **Trailing whitespace is superfluous.**
```r

^~~~~~
```
[R/mbd_loglik_utils.R:144:7:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L144) *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:145:22:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L145) *style:* **Trailing whitespace is superfluous.**
```r
      if (result.nan)
                     ^
```
[R/mbd_loglik_utils.R:146:7:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L146) *style:* **Opening curly braces should never go on their own line and should always be followed by a new line.**
```r
      {
      ^
```
[R/mbd_loglik_utils.R:149:7:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L149) *style:* **Opening curly braces should never go on their own line and should always be followed by a new line.**
```r
      {
      ^
```
[R/mbd_loglik_utils.R:150:9:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L150) *style:* **Variable or function name should be snake_case.**
```r
        result.negative <- (any(result < 0))
        ^~~~~~~~~~~~~~~
```
[R/mbd_loglik_utils.R:151:29:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L151) *style:* **Trailing whitespace is superfluous.**
```r
        if (result.negative)
                            ^
```
[R/mbd_loglik_utils.R:152:9:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L152) *style:* **Opening curly braces should never go on their own line and should always be followed by a new line.**
```r
        {
        ^
```
[R/mbd_loglik_utils.R:154:43:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L154) *style:* **Trailing whitespace is superfluous.**
```r
          if (precision > precision_limit)
                                          ^
```
[R/mbd_loglik_utils.R:155:11:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L155) *style:* **Opening curly braces should never go on their own line and should always be followed by a new line.**
```r
          {
          ^
```
[R/mbd_loglik_utils.R:163:1:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L163) *style:* **Trailing whitespace is superfluous.**
```r

^~
```
[R/mbd_loglik_utils.R:165:20:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L165) *style:* **Opening curly braces should never go on their own line and should always be followed by a new line.**
```r
  if (!bad_result) {bad_result <- (any(result < 0))}
                   ^
```
[R/mbd_loglik_utils.R:165:52:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L165) *style:* **Closing curly-braces should always be on their own line, unless it's followed by an else.**
```r
  if (!bad_result) {bad_result <- (any(result < 0))}
                                                   ^
```
[R/mbd_loglik_utils.R:166:1:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L166) *style:* **Trailing whitespace is superfluous.**
```r

^~
```
[R/mbd_loglik_utils.R:168:3:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L168) *style:* **Opening curly braces should never go on their own line and should always be followed by a new line.**
```r
  {
  ^
```
[R/mbd_loglik_utils.R:171:1:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L171) *style:* **Lines should not be more than 80 characters.**
```r
    R.utils::withTimeout(result <- deSolve::ode(y = Q, times = times, func = mbd_loglik_rhs, parms = ode_matrix, atol = a_abstol, rtol = a_reltol)[2,-1], timeout = 1001)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_loglik_utils.R:171:78:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L171) *warning:* **no visible binding for global variable ‘mbd_loglik_rhs’**
```r
    R.utils::withTimeout(result <- deSolve::ode(y = Q, times = times, func = mbd_loglik_rhs, parms = ode_matrix, atol = a_abstol, rtol = a_reltol)[2,-1], timeout = 1001)
                                                                             ^~~~~~~~~~~~~~
```
[R/mbd_loglik_utils.R:171:150:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L171) *style:* **Commas should always have a space after.**
```r
    R.utils::withTimeout(result <- deSolve::ode(y = Q, times = times, func = mbd_loglik_rhs, parms = ode_matrix, atol = a_abstol, rtol = a_reltol)[2,-1], timeout = 1001)
                                                                                ^
```
[R/mbd_loglik_utils.R:173:1:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L173) *style:* **Trailing whitespace is superfluous.**
```r

^~
```
[R/mbd_loglik_utils.R:181:1:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L181) *style:* **Lines should not be more than 80 characters.**
```r
#' A_operator_old <- function(Q, transition_matrix, time_interval, precision = 50L,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_loglik_utils.R:183:3:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L183) *style:* **Trailing whitespace is superfluous.**
```r
#'
  ^
```
[R/mbd_loglik_utils.R:185:3:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L185) *style:* **Trailing whitespace is superfluous.**
```r
#'
  ^
```
[R/mbd_loglik_utils.R:192:1:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L192) *style:* **Lines should not be more than 80 characters.**
```r
#'     result <- try(expoRkit::expv(v = Q, x = transition_matrix, t = time_interval, m = precision), silent = T)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_loglik_utils.R:193:1:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L193) *style:* **Lines should not be more than 80 characters.**
```r
#'     while ( ( any(!is.numeric(result)) || any(is.nan(result)) ) && precision < precision_limit )
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_loglik_utils.R:196:1:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L196) *style:* **Lines should not be more than 80 characters.**
```r
#'       result <- try(expoRkit::expv(v = Q, x = transition_matrix, t = time_interval, m = precision), silent = T)}
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_loglik_utils.R:202:1:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L202) *style:* **Lines should not be more than 80 characters.**
```r
#'         result <- try(expoRkit::expv(v = Q, x = transition_matrix, t = time_interval, m = precision), silent = T)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_loglik_utils.R:209:1:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L209) *style:* **Lines should not be more than 80 characters.**
```r
#'     # result<-deSolve::ode(y = Q, times = times, func = mbd_loglik_rhs, parms = ode_matrix,atol=a_abstol,rtol=a_reltol)[2,-1]
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_loglik_utils.R:210:1:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L210) *style:* **Lines should not be more than 80 characters.**
```r
#'     R.utils::withTimeout(result <- deSolve::ode(y = Q, times = times, func = mbd_loglik_rhs, parms = ode_matrix,atol=a_abstol,rtol=a_reltol)[2,-1], timeout = 1000)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_loglik_utils.R:212:3:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L212) *style:* **Trailing whitespace is superfluous.**
```r
#'
  ^
```
[R/mbd_loglik_utils.R:213:1:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L213) *style:* **Lines should not be more than 80 characters.**
```r
#'   if (any(!is.numeric(result)) || any(is.nan(result))) #sometimes expoRkit gives weird negative values. In this case perform standard lsoda integration.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_loglik_utils.R:217:1:](https://github.com/Giappo/mbd/blob/fe5deed3b9beaf4671ac0b0345e0fba31ba0ca74/R/mbd_loglik_utils.R#L217) *style:* **Lines should not be more than 80 characters.**
```r
#'     # result<-deSolve::ode(y = Q, times = times, func = mbd_loglik_rhs, parms = ode_matrix,atol=a_abstol,rtol=a_reltol)[2,-1]


compute `partitionsPerPage`:
```
            int partitionsPerPage = ROWS_PER_PAGE / rowsPerPartitions;
```


> @Sariyn wrote:
>
> > It just remains a fact that people respond better, and learn better, when they aren't being spoken down to like trash.
>
> > And you know what, it will let them grow as developers as well by allowing them to grow their collaboration skills, which some of you obviously sorely lack.
>
> You mean, like this (all quotes taken from your posts in this thread)?
>
> @Sariyn wrote:
>
> > GTFO.
>
> > fucking
>
> > f-ing simple to understand, what is wrong with you people hahaha.
>
> > hahaha some of you guys are dumber than a box of rocks. Anyone mention CoC and you all lose your minds and start foaming at the mouth with your stupid anti-sjw white male persecution rhetoric.
>
> > I'll take lies the butthurt community makes up for $1000 please,
>
> > Some of you need to get a grip.
>
> > Secondly, it's really not that open-ended unless you are an idiot.
>
> > That's like every f*king organization in the world!
>
> > Only the crybabies on this board are shifting that focus.
>
> > It's only innocuous if you know how to read, my bad. Should have been specific.
>
> > Honestly. If that's how you truly feel I am in the wrong career, I should have been a shrink or something.
>
> > Did it ever occur to you people that this has less to do with politics and more to do with cultivating productivity and reserving the right to nip unproductive behavior in the bud? No of course not, that would be too easy.
>
> > but I kind of sleep good at night knowing mine at least have some semblance of rational thinking. But you guys are a lot more hilarious than me (hilariously stupid), so kudos there.
>
> > No, you guys need to learn to read before you learn to code.

Like I said, most of you are nothing but disingenuous.  All of those posts were trying to beat some sense into you, you're welcome.
I don't mind talking down to you for a number of reasons, if that is how you want to read into it.  Firstly, it's a little tongue-in-cheek to combat the onslaught of viciousness and lies you are all spreading, and fairly tame in comparison.  You can dish it but you can't take it huh?  Secondly, bad behavior can be a useful tool to highlight bad behavior.  Wouldn't it be nice if we had some kind of guideline, a code if you will, that tried to set expectations for professionalism?  Oh wait...


В route лучше положить весь объект, а не станции. Вдруг нам кроме станций, еще какая-то информация по маршруту понадобится.


Hello,
Did you see any option to generate this code including Unicode str?
Because this commit revert my handmade change that is needed for importer:

97cb141b8bf3665825b7df2a38e0b9c7994953b4#diff-92ab5d61594bb630d109d668bda05114