[R/default_params_doc.R:17:67:](https://github.com/Giappo/mbd/blob/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/R/default_params_doc.R#L126) *style:* **Trailing whitespace is superfluous.**
```r
#' @author Documentation by Giovanni Laudanno,
                                              ^
```
[R/default_params_doc.R:132:3:](https://github.com/Giappo/mbd/blob/2b3d491ecd3f76b85808cd2445e2eebf0109de37/R/default_params_doc.R#L132) *style:* **Variable or function name should be snake_case.**
```r
  A_abstol,
  ^~~~~~~~
```
[R/default_params_doc.R:133:3:](https://github.com/Giappo/mbd/blob/2b3d491ecd3f76b85808cd2445e2eebf0109de37/R/default_params_doc.R#L133) *style:* **Variable or function name should be snake_case.**
```r
  A_reltol,
  ^~~~~~~~
```
[R/default_params_doc.R:144:3:](https://github.com/Giappo/mbd/blob/2b3d491ecd3f76b85808cd2445e2eebf0109de37/R/default_params_doc.R#L144) *style:* **Variable or function name should be snake_case.**
```r
  checked.functions,
  ^~~~~~~~~~~~~~~~~
```
[R/default_params_doc.R:147:3:](https://github.com/Giappo/mbd/blob/2b3d491ecd3f76b85808cd2445e2eebf0109de37/R/default_params_doc.R#L147) *style:* **Variable or function name should be snake_case.**
```r
  function.name,
  ^~~~~~~~~~~~~
```
[R/default_params_doc.R:147:17:](https://github.com/Giappo/mbd/blob/2b3d491ecd3f76b85808cd2445e2eebf0109de37/R/default_params_doc.R#L147) *style:* **Trailing whitespace is superfluous.**
```r
  function.name,
                ^
```
[R/default_params_doc.R:151:3:](https://github.com/Giappo/mbd/blob/2b3d491ecd3f76b85808cd2445e2eebf0109de37/R/default_params_doc.R#L151) *style:* **Variable or function name should be snake_case.**
```r
  INPUT.TREES,
  ^~~~~~~~~~~
```
[R/default_params_doc.R:152:3:](https://github.com/Giappo/mbd/blob/2b3d491ecd3f76b85808cd2445e2eebf0109de37/R/default_params_doc.R#L152) *style:* **Variable or function name should be snake_case.**
```r
  INPUT.XML,
  ^~~~~~~~~
```
[R/default_params_doc.R:153:3:](https://github.com/Giappo/mbd/blob/2b3d491ecd3f76b85808cd2445e2eebf0109de37/R/default_params_doc.R#L153) *style:* **Variable or function name should be snake_case.**
```r
  interval.max,
  ^~~~~~~~~~~~
```
[R/default_params_doc.R:154:3:](https://github.com/Giappo/mbd/blob/2b3d491ecd3f76b85808cd2445e2eebf0109de37/R/default_params_doc.R#L154) *style:* **Variable or function name should be snake_case.**
```r
  interval.min,
  ^~~~~~~~~~~~
```
[R/default_params_doc.R:169:3:](https://github.com/Giappo/mbd/blob/2b3d491ecd3f76b85808cd2445e2eebf0109de37/R/default_params_doc.R#L169) *style:* **Variable or function name should be snake_case.**
```r
  mbd.lambda,
  ^~~~~~~~~~
```
[R/default_params_doc.R:175:3:](https://github.com/Giappo/mbd/blob/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/R/default_params_doc.R#L176) *style:* **Variable or function name should be snake_case.**
```r
  N0,
  ^~
```
[R/default_params_doc.R:177:3:](https://github.com/Giappo/mbd/blob/2b3d491ecd3f76b85808cd2445e2eebf0109de37/R/default_params_doc.R#L177) *style:* **Variable or function name should be snake_case.**
```r
  Nsteps,
  ^~~~~~
```
[R/default_params_doc.R:178:3:](https://github.com/Giappo/mbd/blob/2b3d491ecd3f76b85808cd2445e2eebf0109de37/R/default_params_doc.R#L178) *style:* **Variable or function name should be snake_case.**
```r
  Nsubs,
  ^~~~~
```
[R/default_params_doc.R:182:3:](https://github.com/Giappo/mbd/blob/2b3d491ecd3f76b85808cd2445e2eebf0109de37/R/default_params_doc.R#L182) *style:* **Variable or function name should be snake_case.**
```r
  pars.transform,
  ^~~~~~~~~~~~~~
```
[R/default_params_doc.R:186:11:](https://github.com/Giappo/mbd/blob/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/R/mbd_loglik_choosepar.R#L18) *style:* **Trailing whitespace is superfluous.**
```r
  minimum_multiple_births = 0,
                              ^
```
[R/mbd_loglik_choosepar.R:19:3:](https://github.com/Giappo/mbd/blob/2b3d491ecd3f76b85808cd2445e2eebf0109de37/R/mbd_loglik_choosepar.R#L19) *style:* **Variable or function name should be snake_case.**
```r
  pars.transform = 0,
  ^~~~~~~~~~~~~~
```
[R/mbd_loglik_choosepar.R:19:22:](https://github.com/Giappo/mbd/blob/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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:120:24:](https://github.com/Giappo/mbd/blob/2b3d491ecd3f76b85808cd2445e2eebf0109de37/R/mbd_loglik_utils.R#L120) *style:* **Variable or function name should be snake_case.**
```r
                       A_abstol = 1e-16, A_reltol = 1e-10, methode = "expo"){
                       ^~~~~~~~
```
[R/mbd_loglik_utils.R:120:42:](https://github.com/Giappo/mbd/blob/2b3d491ecd3f76b85808cd2445e2eebf0109de37/R/mbd_loglik_utils.R#L120) *style:* **Variable or function name should be snake_case.**
```r
                       A_abstol = 1e-16, A_reltol = 1e-10, methode = "expo"){
                                         ^~~~~~~~
```
[R/mbd_loglik_utils.R:121:1:](https://github.com/Giappo/mbd/blob/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/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/2b3d491ecd3f76b85808cd2445e2eebf0109de37/R/mbd_loglik_utils.R#L185) *style:* **Trailing whitespace is superfluous.**
```r
#'
  ^
```


Нельзя же так резко остановить поезд) В задании подразумевается передача некоторой дельты, для управления скоростью. Например:
```
def speed_down(delta)
  self.speed -= delta
end
```


I believe the fix was added to .79.0b0. Still get this:

Log Details (ERROR)
Tue Sep 25 2018 06:45:32 GMT-0500 (CDT)

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity.py", line 234, in async_update_ha_state
    state = self.state
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/cover/__init__.py", line 231, in state
    if self.is_opening:
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/cover/myq.py", line 109, in is_opening
    return MYQ_TO_HASS[self._status] == STATE_OPENING
KeyError: False

And this:

Log Details (ERROR)
Tue Sep 25 2018 05:55:54 GMT-0500 (CDT)

MyQ - API Error[get_devices] 500 Server Error: Internal Server Error for url: https://myqexternal.myqdevice.com/api/v4/UserDeviceDetails/Get

And this:

Log Details (ERROR)
Tue Sep 25 2018 09:11:12 GMT-0500 (CDT)

Update for cover.main_garage_door_opener fails
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/urllib3/connection.py", line 171, in _new_conn
    (self._dns_host, self.port), self.timeout, **extra_kw)
  File "/usr/local/lib/python3.6/site-packages/urllib3/util/connection.py", line 56, in create_connection
    for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
  File "/usr/local/lib/python3.6/socket.py", line 745, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -3] Try again

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 600, in urlopen
    chunked=chunked)
  File "/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 343, in _make_request
    self._validate_conn(conn)
  File "/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 849, in _validate_conn
    conn.connect()
  File "/usr/local/lib/python3.6/site-packages/urllib3/connection.py", line 314, in connect
    conn = self._new_conn()
  File "/usr/local/lib/python3.6/site-packages/urllib3/connection.py", line 180, in _new_conn
    self, "Failed to establish a new connection: %s" % e)
urllib3.exceptions.NewConnectionError: <urllib3.connection.VerifiedHTTPSConnection object at 0x6d58b9d0>: Failed to establish a new connection: [Errno -3] Try again

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/requests/adapters.py", line 445, in send
    timeout=timeout
  File "/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 638, in urlopen
    _stacktrace=sys.exc_info()[2])
  File "/usr/local/lib/python3.6/site-packages/urllib3/util/retry.py", line 398, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='myqexternal.myqdevice.com', port=443): Max retries exceeded with url: /api/v4/UserDeviceDetails/Get (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x6d58b9d0>: Failed to establish a new connection: [Errno -3] Try again',))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity.py", line 223, in async_update_ha_state
    yield from self.async_device_update()
  File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity.py", line 352, in async_device_update
    yield from self.hass.async_add_job(self.update)
  File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/cover/myq.py", line 131, in update
    self._status = self.myq.get_status(self.device_id)
  File "/usr/local/lib/python3.6/site-packages/pymyq/__init__.py", line 168, in get_status
    devices = self.get_devices()
  File "/usr/local/lib/python3.6/site-packages/pymyq/__init__.py", line 125, in get_devices
    'User-Agent': self.USERAGENT
  File "/usr/local/lib/python3.6/site-packages/requests/api.py", line 72, in get
    return request('get', url, params=params, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/requests/api.py", line 58, in request
    return session.request(method=method, url=url, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/requests/sessions.py", line 512, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python3.6/site-packages/requests/sessions.py", line 622, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/requests/adapters.py", line 513, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='myqexternal.myqdevice.com', port=443): Max retries exceeded with url: /api/v4/UserDeviceDetails/Get (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x6d58b9d0>: Failed to establish a new connection: [Errno -3] Try again',))


@mfoll ok now multiqc report also uses the output from samtools flagstat, it was not the case before......


It modify the content

it works

C'est bon, Ca marche bien!