[R/mbd_loglik_utils.R:307:46:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_loglik_utils.R#L307) *style:* **Put spaces around all infix operators.**
```r
  soc + max(mvec[(mvec %in% which((cumsum(p_m/sum(p_m))) <= 0.95))])
                                            ~^~
```
[R/mbd_loglik_utils.R:315:1:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_loglik_utils.R#L315) *style:* **Variable and function names should not be longer than 30 characters.**
```r
calculate_conditional_probability <- function(
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_loglik_utils.R:329:31:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_loglik_utils.R#L329) *style:* **Put spaces around all infix operators.**
```r
  one_over_cm <- (3 * (m + 1))/(m + 3); length(one_over_cm)
                             ~^~
```
[R/mbd_loglik_utils.R:329:32:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_loglik_utils.R#L329) *style:* **Place a space before left parenthesis, except in a function call.**
```r
  one_over_cm <- (3 * (m + 1))/(m + 3); length(one_over_cm)
                               ^
```
[R/mbd_loglik_utils.R:363:1:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_loglik_utils.R#L363) *style:* **Variable and function names should not be longer than 30 characters.**
```r
calculate_conditional_probability0 <- function(
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_loglik_utils.R:377:31:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_loglik_utils.R#L377) *style:* **Put spaces around all infix operators.**
```r
  one_over_cm <- (3 * (m + 1))/(m + 3); length(one_over_cm)
                             ~^~
```
[R/mbd_loglik_utils.R:377:32:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_loglik_utils.R#L377) *style:* **Place a space before left parenthesis, except in a function call.**
```r
  one_over_cm <- (3 * (m + 1))/(m + 3); length(one_over_cm)
                               ^
```
[R/mbd_loglik_utils.R:394:54:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_loglik_utils.R#L394) *style:* **Do not place spaces around code in parentheses or square brackets.**
```r
  missingspecies_min <- max((tips_interval[1] - 2), 0 )
                                                     ^
```
[R/mbd_loglik_utils.R:421:12:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_loglik_utils.R#L421) *warning:* **local variable ‘pc’ assigned but may not be used**
```r
    return(pc <- NA)
           ^~
```
[R/mbd_loglik_utils.R:425:31:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_loglik_utils.R#L425) *style:* **Put spaces around all infix operators.**
```r
  one_over_cm <- (3 * (m + 1))/(m + 3); length(one_over_cm)
                             ~^~
```
[R/mbd_loglik_utils.R:425:32:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_loglik_utils.R#L425) *style:* **Place a space before left parenthesis, except in a function call.**
```r
  one_over_cm <- (3 * (m + 1))/(m + 3); length(one_over_cm)
                               ^
```
[R/mbd_loglik_utils.R:449:54:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_loglik_utils.R#L449) *style:* **Do not place spaces around code in parentheses or square brackets.**
```r
  missingspecies_min <- max((tips_interval[1] - 2), 0 )
                                                     ^
```
[R/mbd_loglik_utils.R:475:18:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_loglik_utils.R#L475) *style:* **Put spaces around all infix operators.**
```r
  a <- iterations/2
                ~^~
```
[R/mbd_loglik_utils.R:477:32:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_loglik_utils.R#L477) *style:* **Put spaces around all infix operators.**
```r
  step1 <- floor(interval_width/a)
                              ~^~
```
[R/mbd_loglik_utils.R:553:1:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_loglik_utils.R#L553) *style:* **Variable and function names should not be longer than 30 characters.**
```r
calculate_conditional_probability1 <- function(
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_loglik_utils.R:563:9:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_loglik_utils.R#L563) *warning:* **no visible global function definition for ‘find_best_lx_for_pc’**
```r
  lx <- find_best_lx_for_pc(brts = brts, pars = pars, soc = soc)
        ^~~~~~~~~~~~~~~~~~~
```
[R/mbd_loglik_utils.R:597:18:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_loglik_utils.R#L597) *warning:* **no visible global function definition for ‘brts2time_intervals_and_births’**
```r
  births <- c(0, brts2time_intervals_and_births(brts)$births)
                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_loglik_utils.R:640:16:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_loglik_utils.R#L640) *warning:* **no visible global function definition for ‘negatives_correction’**
```r
      a2_v1 <- negatives_correction(a2_v1, pars)
               ^~~~~~~~~~~~~~~~~~~~
```
[R/mbd_loglik_utils.R:731:35:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_loglik_utils.R#L731) *style:* **Put spaces around all infix operators.**
```r
      delta_pc <- abs(pc_2 - pc_1)/pc_1;
                                 ~^~
```
[R/mbd_loglik.R:84:13:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_loglik.R#L84) *warning:* **no visible global function definition for ‘brts2time_intervals_and_births’**
```r
    data <- brts2time_intervals_and_births(brts)
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_loglik.R:110:11:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_loglik.R#L110) *warning:* **local variable ‘max_number_of_species’ assigned but may not be used**
```r
    lx <- max_number_of_species <- alpha * max_k;
          ^~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_loglik.R:170:23:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_loglik.R#L170) *warning:* **no visible global function definition for ‘negatives_correction’**
```r
          q_t[t, ] <- negatives_correction(q_t[t, ], pars)
                      ^~~~~~~~~~~~~~~~~~~~
```
[R/mbd_loglik.R:188:1:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_loglik.R#L188) *style:* **Lines should not be more than 80 characters.**
```r
          matrix_b <- create_b(lambda = lambda, nu = nu, q = q, k = k, b = births[t],
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_loglik.R:192:25:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_loglik.R#L192) *warning:* **no visible global function definition for ‘negatives_correction’**
```r
            q_t[t, ] <- negatives_correction(q_t[t, ], pars)
                        ^~~~~~~~~~~~~~~~~~~~
```
[R/mbd_loglik.R:231:5:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_loglik.R#L231) *style:* **Variable or function name should be snake_case.**
```r
    P  <- vm * q_t[t, (missnumspec + 1)]
    ^
```
[R/mbd_ml.R:85:31:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_ml.R#L85) *style:* **Opening curly braces should never go on their own line and should always be followed by a new line.**
```r
  if (length(idparsfix) == 0) {idparsfix <- NULL}
                              ^
```
[R/mbd_ml.R:85:49:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_ml.R#L85) *style:* **Closing curly-braces should always be on their own line, unless it's followed by an else.**
```r
  if (length(idparsfix) == 0) {idparsfix <- NULL}
                                                ^
```
[R/mbd_ml.R:131:15:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_ml.R#L131) *style:* **Use <-, not =, for assignment.**
```r
    trparsopt = initparsopt/(1 + initparsopt)
              ^
```
[R/mbd_ml.R:131:28:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_ml.R#L131) *style:* **Put spaces around all infix operators.**
```r
    trparsopt = initparsopt/(1 + initparsopt)
                          ~^~
```
[R/mbd_ml.R:131:29:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_ml.R#L131) *style:* **Place a space before left parenthesis, except in a function call.**
```r
    trparsopt = initparsopt/(1 + initparsopt)
                            ^
```
[R/mbd_ml.R:132:42:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_ml.R#L132) *style:* **Use <-, not =, for assignment.**
```r
    trparsopt[which(initparsopt == Inf)] = 1
                                         ^
```
[R/mbd_ml.R:133:15:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_ml.R#L133) *style:* **Use <-, not =, for assignment.**
```r
    trparsfix = parsfix/(1 + parsfix)
              ^
```
[R/mbd_ml.R:133:24:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_ml.R#L133) *style:* **Put spaces around all infix operators.**
```r
    trparsfix = parsfix/(1 + parsfix)
                      ~^~
```
[R/mbd_ml.R:133:25:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_ml.R#L133) *style:* **Place a space before left parenthesis, except in a function call.**
```r
    trparsfix = parsfix/(1 + parsfix)
                        ^
```
[R/mbd_ml.R:134:38:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_ml.R#L134) *style:* **Use <-, not =, for assignment.**
```r
    trparsfix[which(parsfix == Inf)] = 1
                                     ^
```
[R/mbd_ml.R:200:31:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_ml.R#L200) *style:* **Opening curly braces should never go on their own line and should always be followed by a new line.**
```r
  if (length(idparsfix) != 0) {ml_pars1[idparsfix] <- parsfix}
                              ^
```
[R/mbd_ml.R:200:62:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_ml.R#L200) *style:* **Closing curly-braces should always be on their own line, unless it's followed by an else.**
```r
  if (length(idparsfix) != 0) {ml_pars1[idparsfix] <- parsfix}
                                                             ^
```
[R/mbd_ml.R:201:3:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_ml.R#L201) *style:* **Variable or function name should be snake_case.**
```r
  ML <- as.numeric(unlist(out$fvalues))
  ^~
```
[R/mbd_pure_multiple_birth.R:30:13:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_pure_multiple_birth.R#L30) *warning:* **no visible global function definition for ‘brts2time_intervals_and_births’**
```r
    data <- brts2time_intervals_and_births(test_brts)
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_pure_multiple_birth.R:40:41:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_pure_multiple_birth.R#L40) *style:* **Put spaces around all infix operators.**
```r
      poisson_term <- stats::dpois(i, nu*time_intervals[t], log = FALSE)[
                                       ~^~
```
[R/mbd_pure_multiple_birth.R:41:27:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_pure_multiple_birth.R#L41) *style:* **Put spaces around all infix operators.**
```r
        stats::dpois(i, nu*time_intervals[t], log = FALSE) != 0]
                         ~^~
```
[R/mbd_pure_multiple_birth.R:42:33:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_pure_multiple_birth.R#L42) *style:* **Put spaces around all infix operators.**
```r
      ii <- i[stats::dpois(i, nu*time_intervals[t], log = FALSE) != 0 ]
                               ~^~
```
[R/mbd_pure_multiple_birth.R:42:70:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_pure_multiple_birth.R#L42) *style:* **Do not place spaces around code in parentheses or square brackets.**
```r
      ii <- i[stats::dpois(i, nu*time_intervals[t], log = FALSE) != 0 ]
                                                                     ^
```
[R/mbd_pure_multiple_birth.R:46:24:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_pure_multiple_birth.R#L46) *style:* **Do not place spaces around code in parentheses or square brackets.**
```r
      a_term[t] <- sum( (1 - q) ^ (ii * k[t]) * poisson_term ) * # (1)
                       ^
```
[R/mbd_pure_multiple_birth.R:46:61:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_pure_multiple_birth.R#L46) *style:* **Do not place spaces around code in parentheses or square brackets.**
```r
      a_term[t] <- sum( (1 - q) ^ (ii * k[t]) * poisson_term ) * # (1)
                                                            ^
```
[R/mbd_pure_multiple_birth.R:81:1:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_pure_multiple_birth.R#L81) *style:* **Lines should not be more than 80 characters.**
```r
  condition1 <- (any(is.nan(test_pars)) != 0 | any(is.infinite(test_pars)) != 0 )
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_pure_multiple_birth.R:81:80:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_pure_multiple_birth.R#L81) *style:* **Do not place spaces around code in parentheses or square brackets.**
```r
  condition1 <- (any(is.nan(test_pars)) != 0 | any(is.infinite(test_pars)) != 0 )
                                                                               ^
```
[R/mbd_pure_multiple_birth.R:86:13:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_pure_multiple_birth.R#L86) *warning:* **no visible global function definition for ‘brts2time_intervals_and_births’**
```r
    data <- brts2time_intervals_and_births(test_brts)
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_pure_multiple_birth.R:90:47:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_pure_multiple_birth.R#L90) *style:* **Do not place spaces around code in parentheses or square brackets.**
```r
    a_term <- rep(1, length(time_intervals)    ) #branches
                                              ^
```
[R/mbd_pure_multiple_birth.R:100:1:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_pure_multiple_birth.R#L100) *style:* **Lines should not be more than 80 characters.**
```r
      # (1) nu contribution: (1-q)^(k*i) * (nu*(t_k-t_k-1))^i*exp(-nu*(t_k-t_k-1))/i!
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_pure_multiple_birth.R:102:24:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_pure_multiple_birth.R#L102) *style:* **Do not place spaces around code in parentheses or square brackets.**
```r
      a_term[t] <- sum( (1 - q) ^ (ii * k[t]) * poisson_term ) * # (1)
                       ^
```
[R/mbd_pure_multiple_birth.R:102:61:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_pure_multiple_birth.R#L102) *style:* **Do not place spaces around code in parentheses or square brackets.**
```r
      a_term[t] <- sum( (1 - q) ^ (ii * k[t]) * poisson_term ) * # (1)
                                                            ^
```
[R/mbd_pure_multiple_birth.R:110:17:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_pure_multiple_birth.R#L110) *style:* **Place a space before left parenthesis, except in a function call.**
```r
        (1 - q)^(k[-length(k)] - births)                 # (1)
                ^
```
[R/mbd_pure_multiple_birth.R:149:33:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_pure_multiple_birth.R#L149) *style:* **Do not place spaces around code in parentheses or square brackets.**
```r
  if (min(trpars1[1:n_pars]) < 0 ) {
                                ^
```
[R/mbd_pure_multiple_birth.R:161:1:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_pure_multiple_birth.R#L161) *style:* **Lines should not be more than 80 characters.**
```r
    cat("There are parameter values used which cause numerical problems:", trpars1, "\n")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_pure_multiple_birth.R:185:1:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_pure_multiple_birth.R#L185) *style:* **Lines should not be more than 80 characters.**
```r
  # - changeloglikifnoconv = if T the loglik will be set to -Inf if ML does not converge
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_pure_multiple_birth.R:187:1:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_pure_multiple_birth.R#L187) *style:* **Lines should not be more than 80 characters.**
```r
  # - changeloglikifnoconv = if T the loglik will be set to -Inf if ML does not converge
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_pure_multiple_birth.R:188:1:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_pure_multiple_birth.R#L188) *style:* **Lines should not be more than 80 characters.**
```r
  # - optimmethod = "simplex" (current default) or 'subplex' (default of previous versions)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_pure_multiple_birth.R:193:1:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_pure_multiple_birth.R#L193) *style:* **Lines should not be more than 80 characters.**
```r
  n_pars <- length(namepars); #if you add more parameters to your model just change this
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_pure_multiple_birth.R:194:1:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_pure_multiple_birth.R#L194) *style:* **Lines should not be more than 80 characters.**
```r
  failpars <- rep(-1, n_pars); names(failpars) <- namepars; #those are the parameters that you get if something goes sideways
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_pure_multiple_birth.R:222:33:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_pure_multiple_birth.R#L222) *style:* **Put spaces around all infix operators.**
```r
        trparsopt <- initparsopt/(1 + initparsopt)
                               ~^~
```
[R/mbd_pure_multiple_birth.R:222:34:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_pure_multiple_birth.R#L222) *style:* **Place a space before left parenthesis, except in a function call.**
```r
        trparsopt <- initparsopt/(1 + initparsopt)
                                 ^
```
[R/mbd_pure_multiple_birth.R:224:29:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_pure_multiple_birth.R#L224) *style:* **Put spaces around all infix operators.**
```r
        trparsfix <- parsfix/(1 + parsfix)
                           ~^~
```
[R/mbd_pure_multiple_birth.R:224:30:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_pure_multiple_birth.R#L224) *style:* **Place a space before left parenthesis, except in a function call.**
```r
        trparsfix <- parsfix/(1 + parsfix)
                             ^
```
[R/mbd_pure_multiple_birth.R:237:1:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_pure_multiple_birth.R#L237) *style:* **Lines should not be more than 80 characters.**
```r
      cat("The loglikelihood for the initial parameter values is", initloglik, "\n")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_pure_multiple_birth.R:240:1:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_pure_multiple_birth.R#L240) *style:* **Lines should not be more than 80 characters.**
```r
        cat("The initial parameter values have a likelihood that is equal to 0 or below machine precision. Try again with different initial values.\n")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_pure_multiple_birth.R:244:1:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_pure_multiple_birth.R#L244) *style:* **Lines should not be more than 80 characters.**
```r
                               fun = pmb_loglik_choosepar, trparsopt = trparsopt,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_pure_multiple_birth.R:249:1:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_pure_multiple_birth.R#L249) *style:* **Lines should not be more than 80 characters.**
```r
          cat("Optimization has not converged. Try again with different initial values.\n")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_pure_multiple_birth.R:254:32:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_pure_multiple_birth.R#L254) *style:* **Put spaces around all infix operators.**
```r
            ml_pars <- mltrpars/(1 - mltrpars)
                              ~^~
```
[R/mbd_pure_multiple_birth.R:254:33:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_pure_multiple_birth.R#L254) *style:* **Place a space before left parenthesis, except in a function call.**
```r
            ml_pars <- mltrpars/(1 - mltrpars)
                                ^
```
[R/mbd_pure_multiple_birth.R:264:11:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_pure_multiple_birth.R#L264) *style:* **Variable or function name should be snake_case.**
```r
          ML <- as.numeric(unlist(out$fvalues))
          ^~
```
[R/mbd_sim.R:92:7:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L92) *style:* **Variable or function name should be snake_case.**
```r
      L <- matrix(0, nrow = 1e6, 4)
      ^
```
[R/mbd_sim.R:101:11:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L101) *style:* **Variable or function name should be snake_case.**
```r
          deltaT <- stats::rexp(1, rate = total_rate)
          ^~~~~~
```
[R/mbd_sim.R:102:1:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L102) *style:* **Lines should not be more than 80 characters.**
```r
          outcome <- sample(c(-1, 1, 2), size = 1, prob = c(n_species * mu, n_species * lambda, nu))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_sim.R:103:1:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L103) *style:* **Lines should not be more than 80 characters.**
```r
          delta_n <- -1 * (outcome == -1) + 1 * (outcome == 1) + (outcome == 2) * stats::rbinom(n = 1, size = n_species, prob = q)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_sim.R:113:1:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L113) *style:* **Lines should not be more than 80 characters.**
```r
            L[new_interval, 1] <- t#-(delta_n:1)*1e-5 add this if you need separate time points
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_sim.R:134:5:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L134) *style:* **Variable or function name should be snake_case.**
```r
    L <- L[(1:total_count), ]
    ^
```
[R/mbd_sim.R:142:35:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L142) *style:* **Do not place spaces around code in parentheses or square brackets.**
```r
    crown_species_dead <- (length( unique(sign(alive[, 3]))) != 2 ) * cond
                                  ^
```
[R/mbd_sim.R:142:66:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L142) *style:* **Do not place spaces around code in parentheses or square brackets.**
```r
    crown_species_dead <- (length( unique(sign(alive[, 3]))) != 2 ) * cond
                                                                 ^
```
[R/mbd_sim.R:144:1:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L144) *style:* **Lines should not be more than 80 characters.**
```r
    births.reconstructed_tree <- unlist(unname(sort(DDD::L2brts(L, dropextinct = TRUE), decreasing = TRUE)))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_sim.R:144:5:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L144) *style:* **Variable or function name should be snake_case.**
```r
    births.reconstructed_tree <- unlist(unname(sort(DDD::L2brts(L, dropextinct = TRUE), decreasing = TRUE)))
    ^~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_sim.R:145:1:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L145) *style:* **Lines should not be more than 80 characters.**
```r
    births.full_tree <- unlist(unname(sort(DDD::L2brts(L, dropextinct = FALSE), decreasing = TRUE)))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_sim.R:145:5:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L145) *style:* **Variable or function name should be snake_case.**
```r
    births.full_tree <- unlist(unname(sort(DDD::L2brts(L, dropextinct = FALSE), decreasing = TRUE)))
    ^~~~~~~~~~~~~~~~
```
[R/mbd_sim.R:146:1:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L146) *style:* **Lines should not be more than 80 characters.**
```r
    multiple_births.reconstructed_tree <- sum( duplicated(births.reconstructed_tree))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_sim.R:146:5:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L146) *style:* **Variable and function names should not be longer than 30 characters.**
```r
    multiple_births.reconstructed_tree <- sum( duplicated(births.reconstructed_tree))
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_sim.R:146:5:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L146) *style:* **Variable or function name should be snake_case.**
```r
    multiple_births.reconstructed_tree <- sum( duplicated(births.reconstructed_tree))
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_sim.R:146:47:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L146) *style:* **Do not place spaces around code in parentheses or square brackets.**
```r
    multiple_births.reconstructed_tree <- sum( duplicated(births.reconstructed_tree))
                                              ^
```
[R/mbd_sim.R:147:5:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L147) *style:* **Variable or function name should be snake_case.**
```r
    multiple_births.full_tree <- sum( duplicated(births.full_tree))
    ^~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_sim.R:147:38:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L147) *style:* **Do not place spaces around code in parentheses or square brackets.**
```r
    multiple_births.full_tree <- sum( duplicated(births.full_tree))
                                     ^
```
[R/mbd_sim.R:149:1:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L149) *style:* **Lines should not be more than 80 characters.**
```r
    # multiple_births_check = (multiple_births.full_tree>=minimum_multiple_births)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_sim.R:149:7:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L149) *style:* **Commented code should be removed.**
```r
    # multiple_births_check = (multiple_births.full_tree>=minimum_multiple_births)
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_sim.R:150:1:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L150) *style:* **Lines should not be more than 80 characters.**
```r
    multiple_births_check <- (multiple_births.reconstructed_tree >= minimum_multiple_births)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_sim.R:152:1:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L152) *style:* **Lines should not be more than 80 characters.**
```r
    keep_the_sim <- (!crown_species_dead) & (tips >= tips_interval[1] & tips <= tips_interval[2]) #should i keep this simulation?
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_sim.R:154:1:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L154) *style:* **Lines should not be more than 80 characters.**
```r
  time_points <- unlist(unname(sort(DDD::L2brts(L, dropextinct = TRUE), decreasing = TRUE)))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_sim.R:172:1:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L172) *style:* **Lines should not be more than 80 characters.**
```r
#' @description mbd_sim0 produces simulated trees including multiple speciations at the same time.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_sim.R:179:1:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L179) *style:* **Lines should not be more than 80 characters.**
```r
#' @return The function returns a list of L table, branching times and number of extinct species.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_sim.R:182:1:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L182) *style:* **Lines should not be more than 80 characters.**
```r
#'   \item tes is a tree-object corresponding to the reconstructed phylogenetic tree;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_sim.R:184:1:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L184) *style:* **Lines should not be more than 80 characters.**
```r
#'   \item extinct_species is the number of species gone extinct before the present time;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_sim.R:188:1:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L188) *style:* **Lines should not be more than 80 characters.**
```r
#'      \item second is the label of the parent of the species; positive and negative values only indicate whether the species belongs to the left or right crown lineage;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_sim.R:189:1:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L189) *style:* **Lines should not be more than 80 characters.**
```r
#'      \item third is the label of the daughter species itself; positive and negative values only indicate whether the species belongs to the left or right crown lineage;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_sim.R:190:1:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L190) *style:* **Lines should not be more than 80 characters.**
```r
#'      \item fourth is the time of extinction of the species. If this is equal to -1, then the species is still extant.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_sim.R:195:1:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L195) *style:* **Lines should not be more than 80 characters.**
```r
#' out = mbd_sim0( pars=c(2.5, 0.1, 0.1), soc=2, age=10, cond=1, tips_interval=c(0,Inf))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_sim.R:227:18:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L227) *style:* **Use <-, not =, for assignment.**
```r
      total_count=init_n_lineages
                 ^
```
[R/mbd_sim.R:227:18:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L227) *style:* **Put spaces around all infix operators.**
```r
      total_count=init_n_lineages
                ~^~
```
[R/mbd_sim.R:231:7:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L231) *style:* **Variable or function name should be snake_case.**
```r
      L <- matrix(0, nrow=1e6, 4)
      ^
```
[R/mbd_sim.R:231:26:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L231) *style:* **Put spaces around all infix operators.**
```r
      L <- matrix(0, nrow=1e6, 4)
                        ~^~
```
[R/mbd_sim.R:238:9:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L238) *style:* **Variable or function name should be snake_case.**
```r
        deltaT <- stats::rexp(1, rate = (lambda + n_species * mu))
        ^~~~~~
```
[R/mbd_sim.R:250:1:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L250) *style:* **Lines should not be more than 80 characters.**
```r
          L[new_interval, 1] <- t#-(delta_n:1)*1e-5 add this if you need separate time points
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_sim.R:252:50:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L252) *style:* **Put spaces around all infix operators.**
```r
          L[new_interval, 3] <- abs(new_interval)*sign(parents)
                                                ~^~
```
[R/mbd_sim.R:254:44:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L254) *style:* **Put spaces around all infix operators.**
```r
          pool <- c(pool, abs(new_interval)*sign(parents))
                                          ~^~
```
[R/mbd_sim.R:255:37:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L255) *style:* **Put spaces around all infix operators.**
```r
          total_count <- total_count+delta_n
                                   ~^~
```
[R/mbd_sim.R:259:51:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L259) *style:* **Put spaces around all infix operators.**
```r
            dead <- sample(pool, replace = F, size=1)
                                                 ~^~
```
[R/mbd_sim.R:264:28:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L264) *style:* **Put spaces around all infix operators.**
```r
          pool <- pool[pool!=dead]
                          ~^~~
```
[R/mbd_sim.R:268:5:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L268) *style:* **Variable or function name should be snake_case.**
```r
    L=L[(1:total_count), ]
    ^
```
[R/mbd_sim.R:268:6:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L268) *style:* **Use <-, not =, for assignment.**
```r
    L=L[(1:total_count), ]
     ^
```
[R/mbd_sim.R:268:6:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L268) *style:* **Put spaces around all infix operators.**
```r
    L=L[(1:total_count), ]
    ~^~
```
[R/mbd_sim.R:269:21:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L269) *style:* **Use <-, not =, for assignment.**
```r
    extinct_species = sum(L[, 4]!=-1)
                    ^
```
[R/mbd_sim.R:269:33:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L269) *style:* **Put spaces around all infix operators.**
```r
    extinct_species = sum(L[, 4]!=-1)
                               ~^~~
```
[R/mbd_sim.R:271:9:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L271) *style:* **Use <-, not =, for assignment.**
```r
    tips=length(L[, 4][L[, 4]==-1])
        ^
```
[R/mbd_sim.R:271:9:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L271) *style:* **Put spaces around all infix operators.**
```r
    tips=length(L[, 4][L[, 4]==-1])
       ~^~
```
[R/mbd_sim.R:271:30:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L271) *style:* **Put spaces around all infix operators.**
```r
    tips=length(L[, 4][L[, 4]==-1])
                            ~^~~
```
[R/mbd_sim.R:273:10:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L273) *style:* **Use <-, not =, for assignment.**
```r
    alive=L[L[, 4]==-1, ]
         ^
```
[R/mbd_sim.R:273:10:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L273) *style:* **Put spaces around all infix operators.**
```r
    alive=L[L[, 4]==-1, ]
        ~^~
```
[R/mbd_sim.R:273:19:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L273) *style:* **Put spaces around all infix operators.**
```r
    alive=L[L[, 4]==-1, ]
                 ~^~~
```
[R/mbd_sim.R:274:10:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L274) *style:* **Use <-, not =, for assignment.**
```r
    alive=matrix(alive, ncol=4)
         ^
```
[R/mbd_sim.R:274:10:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L274) *style:* **Put spaces around all infix operators.**
```r
    alive=matrix(alive, ncol=4)
        ~^~
```
[R/mbd_sim.R:274:29:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L274) *style:* **Put spaces around all infix operators.**
```r
    alive=matrix(alive, ncol=4)
                           ~^~
```
[R/mbd_sim.R:275:30:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L275) *style:* **Use <-, not =, for assignment.**
```r
    conditioning_on_survival = ( length( unique(sign(alive[, 3])))!=2 )*cond
                             ^
```
[R/mbd_sim.R:275:33:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L275) *style:* **Do not place spaces around code in parentheses or square brackets.**
```r
    conditioning_on_survival = ( length( unique(sign(alive[, 3])))!=2 )*cond
                                ^
```
[R/mbd_sim.R:275:41:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L275) *style:* **Do not place spaces around code in parentheses or square brackets.**
```r
    conditioning_on_survival = ( length( unique(sign(alive[, 3])))!=2 )*cond
                                        ^
```
[R/mbd_sim.R:275:67:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L275) *style:* **Put spaces around all infix operators.**
```r
    conditioning_on_survival = ( length( unique(sign(alive[, 3])))!=2 )*cond
                                                                 ~^~~
```
[R/mbd_sim.R:275:70:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L275) *style:* **Do not place spaces around code in parentheses or square brackets.**
```r
    conditioning_on_survival = ( length( unique(sign(alive[, 3])))!=2 )*cond
                                                                     ^
```
[R/mbd_sim.R:275:72:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L275) *style:* **Put spaces around all infix operators.**
```r
    conditioning_on_survival = ( length( unique(sign(alive[, 3])))!=2 )*cond
                                                                      ~^~
```
[R/mbd_sim.R:278:1:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L278) *style:* **Lines should not be more than 80 characters.**
```r
    births.reconstructed_tree=unlist(unname(sort(DDD::L2brts(L, dropextinct = T), decreasing = T)))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_sim.R:278:5:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L278) *style:* **Variable or function name should be snake_case.**
```r
    births.reconstructed_tree=unlist(unname(sort(DDD::L2brts(L, dropextinct = T), decreasing = T)))
    ^~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_sim.R:278:30:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L278) *style:* **Use <-, not =, for assignment.**
```r
    births.reconstructed_tree=unlist(unname(sort(DDD::L2brts(L, dropextinct = T), decreasing = T)))
                             ^
```
[R/mbd_sim.R:278:30:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L278) *style:* **Put spaces around all infix operators.**
```r
    births.reconstructed_tree=unlist(unname(sort(DDD::L2brts(L, dropextinct = T), decreasing = T)))
                            ~^~
```
[R/mbd_sim.R:279:1:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L279) *style:* **Lines should not be more than 80 characters.**
```r
    births.full_tree=unlist(unname(sort(DDD::L2brts(L, dropextinct = F), decreasing = T)))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_sim.R:279:5:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L279) *style:* **Variable or function name should be snake_case.**
```r
    births.full_tree=unlist(unname(sort(DDD::L2brts(L, dropextinct = F), decreasing = T)))
    ^~~~~~~~~~~~~~~~
```
[R/mbd_sim.R:279:21:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L279) *style:* **Use <-, not =, for assignment.**
```r
    births.full_tree=unlist(unname(sort(DDD::L2brts(L, dropextinct = F), decreasing = T)))
                    ^
```
[R/mbd_sim.R:279:21:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L279) *style:* **Put spaces around all infix operators.**
```r
    births.full_tree=unlist(unname(sort(DDD::L2brts(L, dropextinct = F), decreasing = T)))
                   ~^~
```
[R/mbd_sim.R:280:1:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L280) *style:* **Lines should not be more than 80 characters.**
```r
    multiple_births.reconstructed_tree = sum( duplicated(births.reconstructed_tree))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_sim.R:280:5:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L280) *style:* **Variable and function names should not be longer than 30 characters.**
```r
    multiple_births.reconstructed_tree = sum( duplicated(births.reconstructed_tree))
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_sim.R:280:5:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L280) *style:* **Variable or function name should be snake_case.**
```r
    multiple_births.reconstructed_tree = sum( duplicated(births.reconstructed_tree))
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_sim.R:280:40:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L280) *style:* **Use <-, not =, for assignment.**
```r
    multiple_births.reconstructed_tree = sum( duplicated(births.reconstructed_tree))
                                       ^
```
[R/mbd_sim.R:280:46:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L280) *style:* **Do not place spaces around code in parentheses or square brackets.**
```r
    multiple_births.reconstructed_tree = sum( duplicated(births.reconstructed_tree))
                                             ^
```
[R/mbd_sim.R:281:5:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L281) *style:* **Variable or function name should be snake_case.**
```r
    multiple_births.full_tree = sum( duplicated(births.full_tree))
    ^~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_sim.R:281:5:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L281) *warning:* **local variable ‘multiple_births.full_tree’ assigned but may not be used**
```r
    multiple_births.full_tree = sum( duplicated(births.full_tree))
    ^~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_sim.R:281:31:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L281) *style:* **Use <-, not =, for assignment.**
```r
    multiple_births.full_tree = sum( duplicated(births.full_tree))
                              ^
```
[R/mbd_sim.R:281:37:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L281) *style:* **Do not place spaces around code in parentheses or square brackets.**
```r
    multiple_births.full_tree = sum( duplicated(births.full_tree))
                                    ^
```
[R/mbd_sim.R:283:1:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L283) *style:* **Lines should not be more than 80 characters.**
```r
    # multiple_births_check = (multiple_births.full_tree>=minimum_multiple_births)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_sim.R:283:7:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L283) *style:* **Commented code should be removed.**
```r
    # multiple_births_check = (multiple_births.full_tree>=minimum_multiple_births)
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_sim.R:284:1:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L284) *style:* **Lines should not be more than 80 characters.**
```r
    multiple_births_check = (multiple_births.reconstructed_tree>=minimum_multiple_births)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_sim.R:284:27:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L284) *style:* **Use <-, not =, for assignment.**
```r
    multiple_births_check = (multiple_births.reconstructed_tree>=minimum_multiple_births)
                          ^
```
[R/mbd_sim.R:284:64:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L284) *style:* **Put spaces around all infix operators.**
```r
    multiple_births_check = (multiple_births.reconstructed_tree>=minimum_multiple_births)
                                                              ~^~~
```
[R/mbd_sim.R:286:1:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L286) *style:* **Lines should not be more than 80 characters.**
```r
  time_points=unlist(unname(sort(DDD::L2brts(L, dropextinct = T), decreasing = T)))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_sim.R:286:14:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L286) *style:* **Use <-, not =, for assignment.**
```r
  time_points=unlist(unname(sort(DDD::L2brts(L, dropextinct = T), decreasing = T)))
             ^
```
[R/mbd_sim.R:286:14:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L286) *style:* **Put spaces around all infix operators.**
```r
  time_points=unlist(unname(sort(DDD::L2brts(L, dropextinct = T), decreasing = T)))
            ~^~
```
[R/mbd_sim.R:287:8:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L287) *style:* **Use <-, not =, for assignment.**
```r
  brts = -sort(abs(as.numeric(time_points)), decreasing = TRUE)
       ^
```
[R/mbd_sim.R:288:7:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L288) *style:* **Use <-, not =, for assignment.**
```r
  tes = DDD::L2phylo(L, dropextinct = T)
      ^
```
[R/mbd_sim.R:289:7:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L289) *style:* **Use <-, not =, for assignment.**
```r
  tas = DDD::L2phylo(L, dropextinct = F)
      ^
```
[R/mbd_sim.R:290:7:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L290) *style:* **Commented code should be removed.**
```r
  #   graphics::plot(tas)
      ^~~~~~~~~~~~~~~~~~~
```
[R/mbd_sim.R:291:7:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L291) *style:* **Commented code should be removed.**
```r
  #   graphics::plot(tes)
      ^~~~~~~~~~~~~~~~~~~
```
[R/mbd_sim.R:304:1:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L304) *style:* **Lines should not be more than 80 characters.**
```r
#' @title Creates a full simulated dataset of trees under the multiple birth death process
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_sim.R:305:1:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L305) *style:* **Lines should not be more than 80 characters.**
```r
#' @description mbd_sim_dataset produces a full dataset of max_sims simulated trees including multiple speciations at the same time. This second version takes into account the possibility both of allopatric and sympatric speciation.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_sim.R:307:1:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L307) *style:* **Lines should not be more than 80 characters.**
```r
#' @param edge the program automatically detects the (estimated) average number of tips. "edge" defines the width of the spread around the mean.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_sim.R:308:1:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L308) *style:* **Lines should not be more than 80 characters.**
```r
#' @return The function returns a list of brts vectors, one for each of the max_sims simulations.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_sim.R:309:1:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L309) *style:* **Lines should not be more than 80 characters.**
```r
#' It also saves those in a file called "sim_data" and saves all the settings in a "general_settings" file.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_sim.R:314:1:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L314) *style:* **Lines should not be more than 80 characters.**
```r
#' # out <- mbd_sim_dataset( pars=c(0.4, 0.1, 0.2, 0.15), soc=2, age=10, cond=1, edge=Inf )
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_sim.R:328:1:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L328) *style:* **Lines should not be more than 80 characters.**
```r
  #"edge" gives the extent of fluctuations around the mean that i want to consider
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_sim.R:338:3:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L338) *style:* **Opening curly braces should never go on their own line and should always be followed by a new line.**
```r
  {
  ^
```
[R/mbd_sim.R:349:1:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L349) *style:* **Lines should not be more than 80 characters.**
```r
    tips_interval <- c(min_tips, max_tips) #c(10, 45) #setting the upper limit over 50 may be a problem #min and max number of tips for simulated trees
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_sim.R:349:45:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L349) *style:* **Commented code should be removed.**
```r
    tips_interval <- c(min_tips, max_tips) #c(10, 45) #setting the upper limit over 50 may be a problem #min and max number of tips for simulated trees
                                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_sim.R:356:3:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L356) *style:* **Opening curly braces should never go on their own line and should always be followed by a new line.**
```r
  {
  ^
```
[R/mbd_sim.R:359:1:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L359) *style:* **Lines should not be more than 80 characters.**
```r
                                tips_interval = tips_interval, minimum_multiple_births = minimum_multiple_births)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_sim.R:366:1:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L366) *style:* **Lines should not be more than 80 characters.**
```r
  max_k <- (init_n_lineages - 1) + (is.list(sim_data)) * max(sapply(sim_data, length)) + (1 - is.list(sim_data)) * length(sim_data)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_sim.R:368:3:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L368) *style:* **Opening curly braces should never go on their own line and should always be followed by a new line.**
```r
  {
  ^
```
[R/mbd_sim.R:369:1:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L369) *style:* **Lines should not be more than 80 characters.**
```r
    all_the_births=sapply(sim_data, FUN = function(brts){return(brts2time_intervals_and_births(brts)$births)})
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_sim.R:369:19:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L369) *style:* **Use <-, not =, for assignment.**
```r
    all_the_births=sapply(sim_data, FUN = function(brts){return(brts2time_intervals_and_births(brts)$births)})
                  ^
```
[R/mbd_sim.R:369:19:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L369) *style:* **Put spaces around all infix operators.**
```r
    all_the_births=sapply(sim_data, FUN = function(brts){return(brts2time_intervals_and_births(brts)$births)})
                 ~^~
```
[R/mbd_sim.R:369:57:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L369) *style:* **Opening curly braces should never go on their own line and should always be followed by a new line.**
```r
    all_the_births=sapply(sim_data, FUN = function(brts){return(brts2time_intervals_and_births(brts)$births)})
                                                        ^
```
[R/mbd_sim.R:369:65:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L369) *warning:* **no visible global function definition for ‘brts2time_intervals_and_births’**
```r
    all_the_births=sapply(sim_data, FUN = function(brts){return(brts2time_intervals_and_births(brts)$births)})
                                                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_sim.R:371:19:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L371) *style:* **Use <-, not =, for assignment.**
```r
    all_the_births=brts2time_intervals_and_births(sim_data)$births
                  ^
```
[R/mbd_sim.R:371:19:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L371) *style:* **Put spaces around all infix operators.**
```r
    all_the_births=brts2time_intervals_and_births(sim_data)$births
                 ~^~
```
[R/mbd_sim.R:371:20:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L371) *warning:* **no visible global function definition for ‘brts2time_intervals_and_births’**
```r
    all_the_births=brts2time_intervals_and_births(sim_data)$births
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_sim.R:377:3:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L377) *style:* **Opening curly braces should never go on their own line and should always be followed by a new line.**
```r
  {
  ^
```
[R/mbd_sim.R:382:1:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L382) *style:* **Lines should not be more than 80 characters.**
```r
  # simpath=paste("sims/", sim_pars[1], "-", sim_pars[2], "-", sim_pars[3], "-", sim_pars[4], "/", sep = '')
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_sim.R:382:5:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L382) *style:* **Commented code should be removed.**
```r
  # simpath=paste("sims/", sim_pars[1], "-", sim_pars[2], "-", sim_pars[3], "-", sim_pars[4], "/", sep = '')
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_sim.R:388:34:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L388) *style:* **Opening curly braces should never go on their own line and should always be followed by a new line.**
```r
  if (file.exists(sim_data_name)){suppressWarnings( file.remove(sim_data_name))}
                                 ^
```
[R/mbd_sim.R:388:52:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L388) *style:* **Do not place spaces around code in parentheses or square brackets.**
```r
  if (file.exists(sim_data_name)){suppressWarnings( file.remove(sim_data_name))}
                                                   ^
```
[R/mbd_sim.R:388:80:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L388) *style:* **Closing curly-braces should always be on their own line, unless it's followed by an else.**
```r
  if (file.exists(sim_data_name)){suppressWarnings( file.remove(sim_data_name))}
                                                                               ^
```
[R/mbd_sim.R:390:1:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L390) *style:* **Lines should not be more than 80 characters.**
```r
  if (file.exists(general_settings_name)){suppressWarnings( file.remove(general_settings_name))}
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_sim.R:390:42:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L390) *style:* **Opening curly braces should never go on their own line and should always be followed by a new line.**
```r
  if (file.exists(general_settings_name)){suppressWarnings( file.remove(general_settings_name))}
                                         ^
```
[R/mbd_sim.R:390:60:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L390) *style:* **Do not place spaces around code in parentheses or square brackets.**
```r
  if (file.exists(general_settings_name)){suppressWarnings( file.remove(general_settings_name))}
                                                           ^
```
[R/mbd_sim.R:390:96:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L390) *style:* **Closing curly-braces should always be on their own line, unless it's followed by an else.**
```r
  if (file.exists(general_settings_name)){suppressWarnings( file.remove(general_settings_name))}
                                                                                ^
```
[R/mbd_sim.R:391:1:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L391) *style:* **Lines should not be more than 80 characters.**
```r
  save(sim_pars, soc, age, cond, max_sims, tips_interval, max_k, max_b, ext_species, additional_species, tips, minimum_multiple_births, file=general_settings_name)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_sim.R:391:141:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L391) *style:* **Put spaces around all infix operators.**
```r
  save(sim_pars, soc, age, cond, max_sims, tips_interval, max_k, max_b, ext_species, additional_species, tips, minimum_multiple_births, file=general_settings_name)
                                                                                ~^~
```
[R/mbd_sim.R:392:1:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L392) *style:* **Lines should not be more than 80 characters.**
```r
  if (file.exists(sim_trees_name)){suppressWarnings( file.remove(sim_trees_name))}
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/mbd_sim.R:392:35:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L392) *style:* **Opening curly braces should never go on their own line and should always be followed by a new line.**
```r
  if (file.exists(sim_trees_name)){suppressWarnings( file.remove(sim_trees_name))}
                                  ^
```
[R/mbd_sim.R:392:53:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L392) *style:* **Do not place spaces around code in parentheses or square brackets.**
```r
  if (file.exists(sim_trees_name)){suppressWarnings( file.remove(sim_trees_name))}
                                                    ^
```
[R/mbd_sim.R:392:82:](https://github.com/Giappo/mbd/blob/94dbf9745f321c79a108fe4fb9e8534d4c4734c1/R/mbd_sim.R#L392) *style:* **Closing curly-braces should always be on their own line, unless it's followed by an else.**
```r
  if (file.exists(sim_trees_name)){suppressWarnings( file.remove(sim_trees_name))}
                                                                                ^
```


Why does ensureCapacity throw an exception when additionalCapacity is 0?
That could be valid.
Wouldn't it be better to just return?


OH MY ENGLISH OH MY SPELLING
NO IM NOT GOING TO REBASE TO FIX A SPELLING


@pbauer Jenkins CI reporting about code analysis
See the full report here: https://jenkins.plone.org/job/package-plone.app.blob/65/violations
```
src/plone/app/blob/content.py:135:13: T000 Todo note found.
src/plone/app/blob/download.py:35:1: C901 'handleRequestRange' is too complex (14)
src/plone/app/blob/field.py:47:12: P002 found "hasattr", consider replacing it
src/plone/app/blob/field.py:145:11: T000 Todo note found.
src/plone/app/blob/field.py:281:16: P002 found "hasattr", consider replacing it
src/plone/app/blob/field.py:312:48: T000 Todo note found.
src/plone/app/blob/field.py:316:38: C815 missing trailing comma in Python 3.5+
src/plone/app/blob/field.py:392:12: P002 found "hasattr", consider replacing it
src/plone/app/blob/markings.py:3:3: T000 Todo note found.
src/plone/app/blob/migrations.py:43:1: C901 'makeMigrator' is too complex (15)
src/plone/app/blob/migrations.py:55:80: E501 line too long (122 > 79 characters)
src/plone/app/blob/migrations.py:83:20: P002 found "hasattr", consider replacing it
src/plone/app/blob/monkey.py:2:3: T000 Todo note found.
src/plone/app/blob/monkey.py:54:12: P002 found "hasattr", consider replacing it
src/plone/app/blob/browser/maintenance.py:29:12: S001 found module formatter
src/plone/app/blob/browser/migration.py:33:26: C812 missing trailing comma
src/plone/app/blob/browser/migration.py:41:26: C812 missing trailing comma
src/plone/app/blob/browser/size.py:30:19: S001 found module formatter
src/plone/app/blob/browser/size.py:42:16: S001 found module formatter
src/plone/app/blob/browser/size.py:46:9: E731 do not assign a lambda expression, use a def
src/plone/app/blob/subtypes/image.py:24:12: P002 found "hasattr", consider replacing it
src/plone/app/blob/subtypes/image.py:27:15: T000 Todo note found.
src/plone/app/blob/subtypes/image.py:29:12: P002 found "hasattr", consider replacing it
src/plone/app/blob/tests/patches.py:17:12: P002 found "hasattr", consider replacing it
src/plone/app/blob/tests/test_integration.py:164:41: P101 format string does contain unindexed parameters
src/plone/app/blob/tests/test_integration.py:167:41: P101 format string does contain unindexed parameters
src/plone/app/blob/tests/test_replacements.py:414:9: E731 do not assign a lambda expression, use a def
src/plone/app/blob/tests/utils.py:60:9: T003 print function found.
src/plone/app/blob/tests/utils.py:61:9: T003 print function found.
src/plone/app/blob/tests/utils.py:62:9: T003 print function found.
src/plone/app/blob/tests/utils.py:74:9: T003 print function found.
src/plone/app/blob/tests/utils.py:75:9: T003 print function found.
src/plone/app/blob/tests/utils.py:76:9: T003 print function found.
```
Follow [these instructions](https://github.com/plone/jenkins.plone.org/blob/master/docs/source/run-qa-on-package.rst) to reproduce it locally.


Now cannot deploy because all the allocated instances are in use.
You can either [upgrade](https://zeit.co/account/plan) your plan or [down scale](https://zeit.co/docs/getting-started/scaling) existing [deployments](https://zeit.co/dashboard/deployments).


At the end you need to build the `ArrayChoiceList()` again here, and the filtered choices will be re-flatten, hence you need the original keys, otherwise your choices view is broken.


@pbauer Jenkins CI reporting about code analysis
See the full report here: https://jenkins.plone.org/job/package-plone.app.blob/66/violations
```
src/plone/app/blob/content.py:135:13: T000 Todo note found.
src/plone/app/blob/download.py:35:1: C901 'handleRequestRange' is too complex (14)
src/plone/app/blob/field.py:47:12: P002 found "hasattr", consider replacing it
src/plone/app/blob/field.py:145:11: T000 Todo note found.
src/plone/app/blob/field.py:281:16: P002 found "hasattr", consider replacing it
src/plone/app/blob/field.py:312:48: T000 Todo note found.
src/plone/app/blob/field.py:316:38: C815 missing trailing comma in Python 3.5+
src/plone/app/blob/field.py:392:12: P002 found "hasattr", consider replacing it
src/plone/app/blob/markings.py:3:3: T000 Todo note found.
src/plone/app/blob/migrations.py:43:1: C901 'makeMigrator' is too complex (15)
src/plone/app/blob/migrations.py:55:80: E501 line too long (122 > 79 characters)
src/plone/app/blob/migrations.py:83:20: P002 found "hasattr", consider replacing it
src/plone/app/blob/monkey.py:2:3: T000 Todo note found.
src/plone/app/blob/monkey.py:54:12: P002 found "hasattr", consider replacing it
src/plone/app/blob/browser/maintenance.py:29:12: S001 found module formatter
src/plone/app/blob/browser/migration.py:33:26: C812 missing trailing comma
src/plone/app/blob/browser/migration.py:41:26: C812 missing trailing comma
src/plone/app/blob/browser/size.py:30:19: S001 found module formatter
src/plone/app/blob/browser/size.py:42:16: S001 found module formatter
src/plone/app/blob/browser/size.py:46:9: E731 do not assign a lambda expression, use a def
src/plone/app/blob/subtypes/image.py:24:12: P002 found "hasattr", consider replacing it
src/plone/app/blob/subtypes/image.py:27:15: T000 Todo note found.
src/plone/app/blob/subtypes/image.py:29:12: P002 found "hasattr", consider replacing it
src/plone/app/blob/tests/patches.py:17:12: P002 found "hasattr", consider replacing it
src/plone/app/blob/tests/test_integration.py:164:41: P101 format string does contain unindexed parameters
src/plone/app/blob/tests/test_integration.py:167:41: P101 format string does contain unindexed parameters
src/plone/app/blob/tests/test_replacements.py:414:9: E731 do not assign a lambda expression, use a def
src/plone/app/blob/tests/utils.py:60:9: T003 print function found.
src/plone/app/blob/tests/utils.py:61:9: T003 print function found.
src/plone/app/blob/tests/utils.py:62:9: T003 print function found.
src/plone/app/blob/tests/utils.py:74:9: T003 print function found.
src/plone/app/blob/tests/utils.py:75:9: T003 print function found.
src/plone/app/blob/tests/utils.py:76:9: T003 print function found.
```
Follow [these instructions](https://github.com/plone/jenkins.plone.org/blob/master/docs/source/run-qa-on-package.rst) to reproduce it locally.


@alexellis had requested I push this through, if you're ready to push your stuff up please do, there was zero intention of stepping on your toes, just we're under a tight deadline as if its not in and tested by Friday then its not going to be available for another 2 weeks.

I'll hold off doing anything here.

Again, apologies please fire ahead with your changes.


Now could not deploy this pull request since the `now.json` file does not contain valid JSON.

	Click here to see the contents of `now.json`

{}
//test

For more information on now.json visit https://zeit.co/docs/features/configuration#now.json.


@kinnarr does this dummy implementation make any sense? Shouldn't we rather have a pure virtual method?


この処理ですが、鶴田さんが実装した `ckecli kubernetes issue` が使えそうでしょうか？
https://github.com/cybozu-go/cke/blob/master/docs/ckecli.md#ckecli-kubernetes


@johnmccabe Ah okay, apologies John, didn't realise the context - might have jumped the gun a little. I'll get all of this tested and updated by midnight tonight (is that enough time for the deadline?). There's the odd change that just needs to be done and then I can get it all pushed again. Thanks!


Необходимо загружать документ, а не его скриншоты. Или как с пиратами карибского моря "у меня нет ключа, у меня лучше! Рисунок ключа!"


@alexellis that work for you?


what's this all about


What about doing a full line match with `"^${tag}$"`?

PS:
- Can you change line 147 error message with "No tag specified"?
- You can use `grep -q` to just check for a match without it actually printing anything.

thanks :)