[R/Condition.R:23:17:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/Condition.R#L23) *style:* **Place a space before left parenthesis, except in a function call.**
```r
  k  <-  lgamma((theta_x / 2) + (theta_y / 2)) -
                ^
```
[R/Condition.R:25:9:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/Condition.R#L25) *style:* **Do not place spaces around code in parentheses or square brackets.**
```r
  l  <- ( (theta_x / 2) - 1) * log(nx) + ((theta_y / 2) - 1) * log(ny)
        ^
```
[R/Condition.R:25:43:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/Condition.R#L25) *style:* **Place a space before left parenthesis, except in a function call.**
```r
  l  <- ( (theta_x / 2) - 1) * log(nx) + ((theta_y / 2) - 1) * log(ny)
                                          ^
```
[R/Condition.R:115:1:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/Condition.R#L115) *style:* **Variable and function names should be all lowercase.**
```r
logLikelihood.Guilds.Conditional <- function(parameters, model,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/Condition.R:115:1:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/Condition.R#L115) *style:* **Words within variable and function names should be separated by '_' rather than '.'.**
```r
logLikelihood.Guilds.Conditional <- function(parameters, model,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/Condition.R:115:1:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/Condition.R#L115) *style:* **Variable and function names should not be longer than 30 characters.**
```r
logLikelihood.Guilds.Conditional <- function(parameters, model,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/Condition.R:137:9:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/Condition.R#L137) *style:* **Variable and function names should be all lowercase.**
```r
  ll <- logLikelihood.Guilds(parameters, model, sadx, sady, verbose)
        ^~~~~~~~~~~~~~~~~~~~
```
[R/Condition.R:137:9:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/Condition.R#L137) *warning:* **no visible global function definition for ‘logLikelihood.Guilds’**
```r
  ll <- logLikelihood.Guilds(parameters, model, sadx, sady, verbose)
        ^~~~~~~~~~~~~~~~~~~~
```
[R/Condition.R:140:23:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/Condition.R#L140) *warning:* **no visible global function definition for ‘calc_conditional’**
```r
  conditional_part <- calc_conditional(parameters, model, Nx, Ny)
                      ^~~~~~~~~~~~~~~~
```
[R/Condition.R:146:1:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/Condition.R#L146) *style:* **Variable and function names should be all lowercase.**
```r
conditional.LogLik <- function(v, model, J, Sx, Sy, Nx, Ny, kda_x, kda_y,
^~~~~~~~~~~~~~~~~~
```
[R/Condition.R:166:9:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/Condition.R#L166) *style:* **Variable and function names should be all lowercase.**
```r
  ll <- logLikguilds(theta_x, theta_y, alpha_x, alpha_y, J,
        ^~~~~~~~~~~~
```
[R/Condition.R:170:14:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/Condition.R#L170) *warning:* **no visible global function definition for ‘calc_conditional’**
```r
  cond_ll <- calc_conditional(v, model, Nx, Ny)
             ^~~~~~~~~~~~~~~~
```
[R/Condition.R:175:1:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/Condition.R#L175) *style:* **Variable and function names should be all lowercase.**
```r
maxLikelihood.Guilds.Conditional <- function(init_vals, model,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/Condition.R:175:1:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/Condition.R#L175) *style:* **Words within variable and function names should be separated by '_' rather than '.'.**
```r
maxLikelihood.Guilds.Conditional <- function(init_vals, model,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/Condition.R:175:1:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/Condition.R#L175) *style:* **Variable and function names should not be longer than 30 characters.**
```r
maxLikelihood.Guilds.Conditional <- function(init_vals, model,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/Condition.R:179:12:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/Condition.R#L179) *style:* **Variable and function names should be all lowercase.**
```r
  kda_x <- calcKDA(sadx)
           ^~~~~~~
```
[R/Condition.R:179:12:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/Condition.R#L179) *warning:* **no visible global function definition for ‘calcKDA’**
```r
  kda_x <- calcKDA(sadx)
           ^~~~~~~
```
[R/Condition.R:180:12:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/Condition.R#L180) *style:* **Variable and function names should be all lowercase.**
```r
  kda_y <- calcKDA(sady)
           ^~~~~~~
```
[R/Condition.R:180:12:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/Condition.R#L180) *warning:* **no visible global function definition for ‘calcKDA’**
```r
  kda_y <- calcKDA(sady)
           ^~~~~~~
```
[R/Condition.R:201:17:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/Condition.R#L201) *style:* **Variable and function names should be all lowercase.**
```r
    out <- -1 * conditional.LogLik(x, model, J, Sx, Sy, Nx, Ny,
                ^~~~~~~~~~~~~~~~~~
```
[R/Condition.R:209:10:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/Condition.R#L209) *warning:* **no visible global function definition for ‘simplex’, Did you mean 'complex'?**
```r
    x <- simplex(init_vals, g, verbose)
         ^~~~~~~
```
[R/drawLocal.R:8:19:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/drawLocal.R#L8) *warning:* **no visible global function definition for ‘pm_sadaux’**
```r
      return(-1 * pm_sadaux(x, I, th, j, k))
                  ^~~~~~~~~
```
[R/drawLocal.R:9:1:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/drawLocal.R#L9) *style:* **Use two spaces to indent, never tabs.**
```r
	}
^
```
[R/drawLocal.R:10:36:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/drawLocal.R#L10) *style:* **Commas should always have a space after.**
```r
    xmax <- stats::optimize(f, c(0,1))$minimum
                                   ^
```
[R/drawLocal.R:11:13:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/drawLocal.R#L11) *warning:* **no visible global function definition for ‘pm_sadaux’**
```r
    ymax <- pm_sadaux(xmax, I, th, j, k)
            ^~~~~~~~~
```
[R/drawLocal.R:12:11:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/drawLocal.R#L12) *warning:* **no visible global function definition for ‘pm_sadaux’**
```r
    y0 <- pm_sadaux(0, I, th, j, k)
          ^~~~~~~~~
```
[R/drawLocal.R:14:1:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/drawLocal.R#L14) *style:* **Use two spaces to indent, never tabs.**
```r
		} else if ((k == j) && (th == 1)) {
^~
```
[R/drawLocal.R:15:1:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/drawLocal.R#L15) *style:* **Use two spaces to indent, never tabs.**
```r
		  y[idx1] <- 0
^~
```
[R/drawLocal.R:16:1:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/drawLocal.R#L16) *style:* **Use two spaces to indent, never tabs.**
```r
		} else if ((k == j) && (th < 1)) {
^~
```
[R/drawLocal.R:17:1:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/drawLocal.R#L17) *style:* **Use two spaces to indent, never tabs.**
```r
		  y[idx1] <- Inf
^~
```
[R/drawLocal.R:17:16:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/drawLocal.R#L17) *warning:* **no visible global function definition for ‘pm_sadaux’**
```r
        return(pm_sadaux(x, I, th, j, k) - ymax + 1)
               ^~~~~~~~~
```
[R/drawLocal.R:18:1:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/drawLocal.R#L18) *style:* **Use two spaces to indent, never tabs.**
```r
		}
^~
```
[R/drawLocal.R:22:11:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/drawLocal.R#L22) *warning:* **no visible global function definition for ‘pm_sadaux’**
```r
    y1 <- pm_sadaux(x1, I, th, j, k)
          ^~~~~~~~~
```
[R/drawLocal.R:23:10:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/drawLocal.R#L23) *style:* **Place a space before left parenthesis, except in a function call.**
```r
    while(ymax < (y1 + 1)) {
         ^
```
[R/drawLocal.R:25:13:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/drawLocal.R#L25) *warning:* **no visible global function definition for ‘pm_sadaux’**
```r
      y1 <- pm_sadaux(x1, I, th, j, k)
            ^~~~~~~~~
```
[R/drawLocal.R:26:1:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/drawLocal.R#L26) *style:* **Use two spaces to indent, never tabs.**
```r
		}
^~
```
[R/drawLocal.R:27:1:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/drawLocal.R#L27) *style:* **Use two spaces to indent, never tabs.**
```r
		f <- function(x) {
^~
```
[R/drawLocal.R:27:19:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/drawLocal.R#L27) *style:* **Put spaces around all infix operators.**
```r
		f <- function(x) {
                 ~^~~
```
[R/drawLocal.R:28:1:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/drawLocal.R#L28) *style:* **Use two spaces to indent, never tabs.**
```r
				return(pm_sadaux(x, I, th, j, k)- ymax + 1)
^~~~
```
[R/drawLocal.R:28:12:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/drawLocal.R#L28) *warning:* **no visible global function definition for ‘pm_sadaux’**
```r
				return(pm_sadaux(x, I, th, j, k)- ymax + 1)
           ^~~~~~~~~
```
[R/drawLocal.R:29:1:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/drawLocal.R#L29) *style:* **Use two spaces to indent, never tabs.**
```r
		}
^~
```
[R/drawLocal.R:30:1:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/drawLocal.R#L30) *style:* **Use two spaces to indent, never tabs.**
```r

^~
```
[R/drawLocal.R:30:1:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/drawLocal.R#L30) *style:* **Trailing whitespace is superfluous.**
```r

^~
```
[R/drawLocal.R:31:1:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/drawLocal.R#L31) *style:* **Use two spaces to indent, never tabs.**
```r
		xplu <- stats::uniroot(f, c(xmax, x1), tol = pracma::eps())$root
^~
```
[R/drawLocal.R:31:22:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/drawLocal.R#L31) *style:* **Put spaces around all infix operators.**
```r
		xplu <- stats::uniroot(f, c(xmax, x1), tol = pracma::eps())$root
                    ~^~~
```
[R/drawLocal.R:31:60:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/drawLocal.R#L31) *style:* **Put spaces around all infix operators.**
```r
		xplu <- stats::uniroot(f, c(xmax, x1), tol = pracma::eps())$root
                                                          ~^~
```
[R/drawLocal.R:32:1:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/drawLocal.R#L32) *style:* **Use two spaces to indent, never tabs.**
```r
		xlft <- xmax - 10 * (xmax - xmin)
^~
```
[R/drawLocal.R:32:22:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/drawLocal.R#L32) *style:* **Put spaces around all infix operators.**
```r
		xlft <- xmax - 10 * (xmax - xmin)
                    ~^~~
```
[R/drawLocal.R:32:30:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/drawLocal.R#L32) *style:* **Put spaces around all infix operators.**
```r
		xlft <- xmax - 10 * (xmax - xmin)
                            ~^~
```
[R/drawLocal.R:32:35:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/drawLocal.R#L32) *style:* **Put spaces around all infix operators.**
```r
		xlft <- xmax - 10 * (xmax - xmin)
                                 ~^
```
[R/drawLocal.R:32:36:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/drawLocal.R#L32) *style:* **Trailing whitespace is superfluous.**
```r
		xlft <- xmax - 10 * (xmax - xmin)
                                   ^
```
[R/drawLocal.R:33:1:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/drawLocal.R#L33) *style:* **Use two spaces to indent, never tabs.**
```r
		xlft <- max(0, xlft)
^~
```
[R/drawLocal.R:33:22:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/drawLocal.R#L33) *style:* **Put spaces around all infix operators.**
```r
		xlft <- max(0, xlft)
                    ~^~~
```
[R/drawLocal.R:34:1:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/drawLocal.R#L34) *style:* **Use two spaces to indent, never tabs.**
```r
		xrgt <- xmax + 10 * (xplu - xmax)
^~
```
[R/drawLocal.R:34:22:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/drawLocal.R#L34) *style:* **Put spaces around all infix operators.**
```r
		xrgt <- xmax + 10 * (xplu - xmax)
                    ~^~~
```
[R/drawLocal.R:34:30:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/drawLocal.R#L34) *style:* **Put spaces around all infix operators.**
```r
		xrgt <- xmax + 10 * (xplu - xmax)
                            ~^~
```
[R/drawLocal.R:34:35:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/drawLocal.R#L34) *style:* **Put spaces around all infix operators.**
```r
		xrgt <- xmax + 10 * (xplu - xmax)
                                 ~^~
```
[R/drawLocal.R:35:1:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/drawLocal.R#L35) *style:* **Use two spaces to indent, never tabs.**
```r
		xrgt <- min(1, xrgt)
^~
```
[R/drawLocal.R:35:22:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/drawLocal.R#L35) *style:* **Put spaces around all infix operators.**
```r
		xrgt <- min(1, xrgt)
                    ~^~~
```
[R/drawLocal.R:37:1:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/drawLocal.R#L37) *style:* **Use two spaces to indent, never tabs.**
```r
		f <- function(x) {
^~
```
[R/drawLocal.R:37:19:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/drawLocal.R#L37) *style:* **Put spaces around all infix operators.**
```r
		f <- function(x) {
                 ~^~~
```
[R/drawLocal.R:38:1:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/drawLocal.R#L38) *style:* **Use two spaces to indent, never tabs.**
```r
		    return( exp( pm_sadaux(x, I, th, j, k)))
^~
```
[R/drawLocal.R:38:20:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/drawLocal.R#L38) *warning:* **no visible global function definition for ‘pm_sadaux’**
```r
		    return( exp( pm_sadaux(x, I, th, j, k)))
                   ^~~~~~~~~
```
[R/drawLocal.R:39:1:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/drawLocal.R#L39) *style:* **Use two spaces to indent, never tabs.**
```r
		}
^~
```
[R/drawLocal.R:41:1:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/drawLocal.R#L41) *style:* **Use two spaces to indent, never tabs.**
```r
		res[cnt] <- integrate(f, xlft, xrgt, abs.tol = 1e-9)$val  #checked!!!!!1
^~
```
[R/drawLocal.R:41:26:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/drawLocal.R#L41) *style:* **Put spaces around all infix operators.**
```r
		res[cnt] <- integrate(f, xlft, xrgt, abs.tol = 1e-9)$val  #checked!!!!!1
                        ~^~~
```
[R/drawLocal.R:41:62:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/drawLocal.R#L41) *style:* **Put spaces around all infix operators.**
```r
		res[cnt] <- integrate(f, xlft, xrgt, abs.tol = 1e-9)$val  #checked!!!!!1
                                                            ~^~
```
[R/drawLocal.R:44:1:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/drawLocal.R#L44) *style:* **Use two spaces to indent, never tabs.**
```r
	#the original algorithm had 1:j, but at the interp1 algorithm
^
```
[R/drawLocal.R:44:63:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/drawLocal.R#L44) *style:* **Trailing whitespace is superfluous.**
```r
	#the original algorithm had 1:j, but at the interp1 algorithm
                                                              ^
```
[R/drawLocal.R:45:1:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/drawLocal.R#L45) *style:* **Use two spaces to indent, never tabs.**
```r
	# does not evaluate at the ends.
^
```
[R/drawLocal.R:46:1:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/drawLocal.R#L46) *style:* **Use two spaces to indent, never tabs.**
```r
	k2 <- 1:(j - 1)
^
```
[R/drawLocal.R:46:12:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/drawLocal.R#L46) *style:* **Put spaces around all infix operators.**
```r
	k2 <- 1:(j - 1)
          ~^
```
[R/drawLocal.R:46:17:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/drawLocal.R#L46) *style:* **Place a space before left parenthesis, except in a function call.**
```r
	k2 <- 1:(j - 1)
                ^
```
[R/drawLocal.R:46:17:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/drawLocal.R#L46) *style:* **Trailing whitespace is superfluous.**
```r
	k2 <- 1:(j - 1)
                ^~
```
[R/drawLocal.R:47:1:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/drawLocal.R#L47) *style:* **Use two spaces to indent, never tabs.**
```r
	kesk <- pracma::interp1(x = log2(k1),
^
```
[R/drawLocal.R:47:14:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/drawLocal.R#L47) *style:* **Put spaces around all infix operators.**
```r
	kesk <- pracma::interp1(x = log2(k1),
            ~^~~
```
[R/drawLocal.R:47:35:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/drawLocal.R#L47) *style:* **Put spaces around all infix operators.**
```r
	kesk <- pracma::interp1(x = log2(k1),
                                 ~^~
```
[R/drawLocal.R:47:39:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/drawLocal.R#L47) *style:* **Trailing whitespace is superfluous.**
```r
	kesk <- pracma::interp1(x = log2(k1),
                                      ^
```
[R/drawLocal.R:48:1:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/drawLocal.R#L48) *style:* **Use two spaces to indent, never tabs.**
```r
	                        y = k1 * res,
^
```
[R/drawLocal.R:48:35:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/drawLocal.R#L48) *style:* **Put spaces around all infix operators.**
```r
	                        y = k1 * res,
                                  ^~
```
[R/drawLocal.R:48:39:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/drawLocal.R#L48) *style:* **Trailing whitespace is superfluous.**
```r
	                        y = k1 * res,
                                      ^
```
[R/drawLocal.R:49:1:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/drawLocal.R#L49) *style:* **Use two spaces to indent, never tabs.**
```r
	                        xi = log2(k2),
^
```
[R/drawLocal.R:49:36:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/drawLocal.R#L49) *style:* **Put spaces around all infix operators.**
```r
	                        xi = log2(k2),
                                  ~^~
```
[R/drawLocal.R:49:40:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/drawLocal.R#L49) *style:* **Trailing whitespace is superfluous.**
```r
	                        xi = log2(k2),
                                       ^
```
[R/drawLocal.R:50:1:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/drawLocal.R#L50) *style:* **Use two spaces to indent, never tabs.**
```r
	                        method = "spline")
^
```
[R/drawLocal.R:50:40:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/drawLocal.R#L50) *style:* **Put spaces around all infix operators.**
```r
	                        method = "spline")
                                      ~^~
```
[R/drawLocal.R:51:1:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/drawLocal.R#L51) *style:* **Use two spaces to indent, never tabs.**
```r
	k2 <- c(k2, j)
^
```
[R/drawLocal.R:51:12:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/drawLocal.R#L51) *style:* **Put spaces around all infix operators.**
```r
	k2 <- c(k2, j)
          ~^~~
```
[R/drawLocal.R:52:1:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/drawLocal.R#L52) *style:* **Use two spaces to indent, never tabs.**
```r
	kesk <- c(kesk, 0)
^
```
[R/drawLocal.R:52:14:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/drawLocal.R#L52) *style:* **Put spaces around all infix operators.**
```r
	kesk <- c(kesk, 0)
            ~^~~
```
[R/drawLocal.R:53:1:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/drawLocal.R#L53) *style:* **Use two spaces to indent, never tabs.**
```r
	esk <- kesk / k2
^
```
[R/drawLocal.R:53:13:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/drawLocal.R#L53) *style:* **Put spaces around all infix operators.**
```r
	esk <- kesk / k2
           ~^
```
[R/drawLocal.R:54:1:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/drawLocal.R#L54) *style:* **Use two spaces to indent, never tabs.**
```r
	esk[esk < pracma::eps()] <- pracma::eps()
^
```
[R/drawLocal.R:54:17:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/drawLocal.R#L54) *style:* **Put spaces around all infix operators.**
```r
	esk[esk < pracma::eps()] <- pracma::eps()
               ~^~
```
[R/drawLocal.R:54:34:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/drawLocal.R#L54) *style:* **Put spaces around all infix operators.**
```r
	esk[esk < pracma::eps()] <- pracma::eps()
                                ~^~~
```
[R/drawLocal.R:55:1:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/drawLocal.R#L55) *style:* **Use two spaces to indent, never tabs.**
```r
	return(esk)
^
```
[R/drawLocal.R:61:5:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/drawLocal.R#L61) *style:* **Place a space before left parenthesis, except in a function call.**
```r
  if(length(idx0) > 0) {
    ^
```
[R/drawLocal.R:62:42:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/drawLocal.R#L62) *style:* **Put spaces around all infix operators.**
```r
    aux <- log(th) + lgamma(I) - lgamma(I+j) +
                                        ~^~
```
[R/drawLocal.R:69:9:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/drawLocal.R#L69) *style:* **Place a space before left parenthesis, except in a function call.**
```r
    if ((k<j)||((k == j) && (th > 1))) {
        ^
```
[R/drawLocal.R:69:11:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/drawLocal.R#L69) *style:* **Put spaces around all infix operators.**
```r
    if ((k<j)||((k == j) && (th > 1))) {
         ~^~
```
[R/drawLocal.R:69:14:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/drawLocal.R#L69) *style:* **Put spaces around all infix operators.**
```r
    if ((k<j)||((k == j) && (th > 1))) {
            ~^~~
```
[R/drawLocal.R:69:16:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/drawLocal.R#L69) *style:* **Place a space before left parenthesis, except in a function call.**
```r
    if ((k<j)||((k == j) && (th > 1))) {
               ^
```
[R/drawLocal.R:69:17:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/drawLocal.R#L69) *style:* **Place a space before left parenthesis, except in a function call.**
```r
    if ((k<j)||((k == j) && (th > 1))) {
                ^
```
[R/drawLocal.R:71:27:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/drawLocal.R#L71) *style:* **Place a space before left parenthesis, except in a function call.**
```r
		} else if ((k == j) && (th == 1)) {
                          ^
```
[R/drawLocal.R:71:28:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/drawLocal.R#L71) *style:* **Place a space before left parenthesis, except in a function call.**
```r
		} else if ((k == j) && (th == 1)) {
                           ^
```
[R/drawLocal.R:71:31:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/drawLocal.R#L71) *style:* **Put spaces around all infix operators.**
```r
		} else if ((k == j) && (th == 1)) {
                             ~^~~
```
[R/drawLocal.R:71:37:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/drawLocal.R#L71) *style:* **Put spaces around all infix operators.**
```r
		} else if ((k == j) && (th == 1)) {
                                    ^~~
```
[R/drawLocal.R:73:27:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/drawLocal.R#L73) *style:* **Place a space before left parenthesis, except in a function call.**
```r
		} else if ((k == j) && (th < 1)) {
                          ^
```
[R/drawLocal.R:73:28:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/drawLocal.R#L73) *style:* **Place a space before left parenthesis, except in a function call.**
```r
		} else if ((k == j) && (th < 1)) {
                           ^
```
[R/drawLocal.R:73:31:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/drawLocal.R#L73) *style:* **Put spaces around all infix operators.**
```r
		} else if ((k == j) && (th < 1)) {
                             ~^~~
```
[R/drawLocal.R:73:37:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/drawLocal.R#L73) *style:* **Put spaces around all infix operators.**
```r
		} else if ((k == j) && (th < 1)) {
                                   ~^~~
```
[R/drawLocal.R:77:17:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/drawLocal.R#L77) *style:* **Place a space before left parenthesis, except in a function call.**
```r
  idxp <- which((x > 0) & (x < 1))
                ^
```
[R/drawLocal.R:79:29:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/drawLocal.R#L79) *style:* **Put spaces around all infix operators.**
```r
  aux <- log(th) + lgamma(I)-lgamma(I + j) +
                           ~^~
```
[R/drawLocal.R:83:13:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/drawLocal.R#L83) *style:* **Put spaces around all infix operators.**
```r
         (th-1) * log(1 - xx) - log(xx)
           ~^~
```
[R/drawLocal.R:90:9:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/drawLocal.R#L90) *warning:* **no visible global function definition for ‘getpx’, Did you mean 'get'?**
```r
  nx <- getpx(theta, alpha_x, alpha_y, JX, JY)
        ^~~~~
```
[R/drawLocal.R:94:27:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/drawLocal.R#L94) *style:* **Put spaces around all infix operators.**
```r
  I_X <- alpha_x * nx * (J-1) / (1 - alpha_x * nx - alpha_y * ny)
                         ~^~
```
[R/drawLocal.R:95:27:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/drawLocal.R#L95) *style:* **Put spaces around all infix operators.**
```r
  I_Y <- alpha_y * ny * (J-1) / (1 - alpha_x * nx - alpha_y * ny)
                         ~^~
```
[R/drawLocal.R:97:11:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/drawLocal.R#L97) *warning:* **no visible global function definition for ‘pm_sad’**
```r
  sadx <- pm_sad(theta, I_X, JX)
          ^~~~~~
```
[R/drawLocal.R:98:11:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/drawLocal.R#L98) *warning:* **no visible global function definition for ‘pm_sad’**
```r
  sady <- pm_sad(theta, I_Y, JY)
          ^~~~~~
```
[R/drawLocal.R:110:68:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/drawLocal.R#L110) *style:* **Trailing whitespace is superfluous.**
```r
  I_X <- alpha_x * nx * (J - 1) / (1 - alpha_x * nx - alpha_y * ny)
                                                                   ^
```
[R/drawLocal.R:112:1:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/drawLocal.R#L112) *style:* **Trailing whitespace is superfluous.**
```r

^~
```
[R/drawLocal.R:117:1:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/drawLocal.R#L117) *style:* **Trailing whitespace is superfluous.**
```r

^~
```
[R/drawLocal.R:119:3:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/drawLocal.R#L119) *style:* **Variable and function names should be all lowercase.**
```r
  allN <- 0:J
  ^~~~
```
[R/drawLocal.R:121:12:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/drawLocal.R#L121) *warning:* **no visible global function definition for ‘polyaeggenberger’**
```r
  probs <- polyaeggenberger(I_X, I_Y, J, allN)
           ^~~~~~~~~~~~~~~~
```
[R/drawLocal.R:121:42:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/drawLocal.R#L121) *style:* **Variable and function names should be all lowercase.**
```r
  probs <- polyaeggenberger(I_X, I_Y, J, allN)
                                         ^~~~
```
[R/drawLocal.R:126:11:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/drawLocal.R#L126) *warning:* **no visible global function definition for ‘pm_sad’**
```r
  sadx <- pm_sad(theta, I_X, NX)
          ^~~~~~
```
[R/drawLocal.R:127:11:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/drawLocal.R#L127) *warning:* **no visible global function definition for ‘pm_sad’**
```r
  sady <- pm_sad(theta, I_Y, NY)
          ^~~~~~
```
[R/ESF_function.R:1:1:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/ESF_function.R#L1) *style:* **Variable and function names should be all lowercase.**
```r
logLikelihood.ESF <- function(theta, m, abund) {
^~~~~~~~~~~~~~~~~
```
[R/ESF_function.R:10:14:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/ESF_function.R#L10) *style:* **Put spaces around all infix operators.**
```r
  I <- m * (J-1) / (1 - m)
            ~^~
```
[R/ESF_function.R:12:10:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/ESF_function.R#L12) *style:* **Variable and function names should be all lowercase.**
```r
  kda <- calcKDA(abund)  #confirmed in PARI
         ^~~~~~~
```
[R/ESF_function.R:12:10:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/ESF_function.R#L12) *warning:* **no visible global function definition for ‘calcKDA’**
```r
  kda <- calcKDA(abund)  #confirmed in PARI
         ^~~~~~~
```
[R/ESF_function.R:14:13:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/ESF_function.R#L14) *warning:* **no visible global function definition for ‘calc_sum_kda’**
```r
  sumkda <- calc_sum_kda(S, J, I, theta, kda)
            ^~~~~~~~~~~~
```
[R/ESF_function.R:19:22:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/ESF_function.R#L19) *style:* **Do not place spaces around code in parentheses or square brackets.**
```r
  prefactor1 <- -1 * ( sum(log(abund)) + sum(lgamma(1 + freq_x)))
                     ^
```
[R/ESF_function.R:22:22:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/ESF_function.R#L22) *style:* **Put spaces around all infix operators.**
```r
  factor1 <- lgamma(J+1) + prefactor1
                    ~^~
```
[R/ESF_function.R:24:15:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/ESF_function.R#L24) *style:* **Put spaces around all infix operators.**
```r
  factor2 <- S*log(theta)   -  (lgamma(I + J) - lgamma(I))
             ~^~
```
[R/ESF_function.R:28:1:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/ESF_function.R#L28) *style:* **Use two spaces to indent, never tabs.**
```r
	  out <- -1 * esf_local(x, abund, prefactor, kda)
^
```
[R/ESF_function.R:29:1:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/ESF_function.R#L29) *style:* **Use two spaces to indent, never tabs.**
```r
		return(out)
^~
```
[R/ESF_function.R:44:13:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/ESF_function.R#L44) *warning:* **no visible global function definition for ‘calc_sum_kda’**
```r
  sumkda <- calc_sum_kda(S, J, I, theta, kda)
            ^~~~~~~~~~~~
```
[R/ESF_function.R:52:1:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/ESF_function.R#L52) *style:* **Variable and function names should be all lowercase.**
```r
maxLikelihood.ESF <- function(init_vals, abund, verbose=TRUE) {
^~~~~~~~~~~~~~~~~
```
[R/ESF_function.R:70:10:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/ESF_function.R#L70) *style:* **Variable and function names should be all lowercase.**
```r
  kda <- calcKDA(abund)  #confirmed in PARI
         ^~~~~~~
```
[R/ESF_function.R:70:10:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/ESF_function.R#L70) *warning:* **no visible global function definition for ‘calcKDA’**
```r
  kda <- calcKDA(abund)  #confirmed in PARI
         ^~~~~~~
```
[R/ESF_function.R:76:24:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/ESF_function.R#L76) *style:* **Put spaces around all infix operators.**
```r
  prefactor <- lgamma(J+1) - ( sum(log(abund)) + sum(lgamma(1 + freq_x)) )
                      ~^~
```
[R/ESF_function.R:79:15:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/ESF_function.R#L79) *style:* **Put spaces around all infix operators.**
```r
	  out <- -1 * esf_local(x, abund, prefactor, kda)
             ~^~~
```
[R/ESF_function.R:79:16:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/ESF_function.R#L79) *warning:* **no visible global function definition for ‘esf_local’**
```r
	  out <- -1 * esf_local(x, abund, prefactor, kda)
               ^~~~~~~~~
```
[R/ESF_function.R:79:21:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/ESF_function.R#L79) *style:* **Put spaces around all infix operators.**
```r
	  out <- -1 * esf_local(x, abund, prefactor, kda)
                   ~^~
```
[R/ESF_function.R:83:14:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/ESF_function.R#L83) *warning:* **no visible global function definition for ‘simplex’, Did you mean 'complex'?**
```r
  optimum <- simplex(init_vals, g, verbose)
             ^~~~~~~
```
[R/evaluateLogLik2.R:1:1:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/evaluateLogLik2.R#L1) *style:* **Variable and function names should be all lowercase.**
```r
evaluateLogLik <- function(v, theta_x, theta_y, alpha_x, alpha_y,
^~~~~~~~~~~~~~
```
[R/evaluateLogLik2.R:17:8:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/evaluateLogLik2.R#L17) *style:* **Do not place spaces around code in parentheses or square brackets.**
```r
  l <- ( (theta_x / 2) - 1) * log(nx) + ((theta_y / 2) - 1) * log(ny)
       ^
```
[R/evaluateLogLik2.R:17:42:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/evaluateLogLik2.R#L17) *style:* **Place a space before left parenthesis, except in a function call.**
```r
  l <- ( (theta_x / 2) - 1) * log(nx) + ((theta_y / 2) - 1) * log(ny)
                                         ^
```
[R/evaluateLogLik2.R:19:8:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/evaluateLogLik2.R#L19) *warning:* **no visible global function definition for ‘calc_sum_kda’**
```r
  s <- calc_sum_kda(Sx, Nx, I_X, (theta_x / 2), KDA_X)
       ^~~~~~~~~~~~
```
[R/evaluateLogLik2.R:20:8:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/evaluateLogLik2.R#L20) *warning:* **no visible global function definition for ‘calc_sum_kda’**
```r
  z <- calc_sum_kda(Sy, Ny, I_Y, (theta_y / 2), KDA_Y)
       ^~~~~~~~~~~~
```
[R/expected.R:2:19:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/expected.R#L2) *style:* **Commas should always have a space after.**
```r
  output <- rep(0,13)
                  ^
```
[R/expected.R:5:15:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/expected.R#L5) *style:* **Put spaces around all infix operators.**
```r
    start <- 2^(k - 1)
             ~^~
```
[R/expected.R:5:16:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/expected.R#L5) *style:* **Place a space before left parenthesis, except in a function call.**
```r
    start <- 2^(k - 1)
               ^
```
[R/expected.R:6:18:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/expected.R#L6) *style:* **Put spaces around all infix operators.**
```r
    end <- -1 + 2^(k)
                ~^~
```
[R/expected.R:6:19:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/expected.R#L6) *style:* **Place a space before left parenthesis, except in a function call.**
```r
    end <- -1 + 2^(k)
                  ^
```
[R/expected.R:7:1:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/expected.R#L7) *style:* **Use two spaces to indent, never tabs.**
```r
		M <- draw_local(theta, alpha_x, alpha_y, J)
^~
```
[R/expected.R:7:7:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/expected.R#L7) *style:* **Place a space before left parenthesis, except in a function call.**
```r
    if(end > length(A)) {
      ^
```
[R/expected.R:8:1:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/expected.R#L8) *style:* **Use two spaces to indent, never tabs.**
```r
		for (m in seq_along(M$guildX)) {
^~
```
[R/expected.R:9:1:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/expected.R#L9) *style:* **Use two spaces to indent, never tabs.**
```r
			meanx[m] <- meanx[m] + M$guildX[m]
^~~
```
[R/expected.R:10:1:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/expected.R#L10) *style:* **Use two spaces to indent, never tabs.**
```r
		}
^~
```
[R/expected.R:11:1:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/expected.R#L11) *style:* **Use two spaces to indent, never tabs.**
```r
		for (m in seq_along(M$guildY)) {
^~
```
[R/expected.R:11:1:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/expected.R#L11) *style:* **Use two spaces to indent, never tabs.**
```r
		M <- draw_local_cond(theta, alpha_x, alpha_y, Jx, Jy)
^~
```
[R/expected.R:12:1:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/expected.R#L12) *style:* **Use two spaces to indent, never tabs.**
```r
			meany[m] <- meany[m] + M$guildY[m]
^~~
```
[R/expected.R:12:1:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/expected.R#L12) *style:* **Use two spaces to indent, never tabs.**
```r
		for (m in seq_along(M$guildX)) {
^~
```
[R/expected.R:13:1:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/expected.R#L13) *style:* **Use two spaces to indent, never tabs.**
```r
		}
^~
```
[R/expected.R:13:1:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/expected.R#L13) *style:* **Use two spaces to indent, never tabs.**
```r
			meanx[m] <- meanx[m] + M$guildX[m]
^~~
```
[R/expected.R:14:1:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/expected.R#L14) *style:* **Use two spaces to indent, never tabs.**
```r
		}
^~
```
[R/expected.R:15:1:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/expected.R#L15) *style:* **Use two spaces to indent, never tabs.**
```r
		for (m in seq_along(M$guildY)) {
^~
```
[R/expected.R:16:1:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/expected.R#L16) *style:* **Use two spaces to indent, never tabs.**
```r
			meany[m] <- meany[m] + M$guildY[m]
^~~
```
[R/expected.R:17:1:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/expected.R#L17) *style:* **Use two spaces to indent, never tabs.**
```r
		}
^~
```
[R/expected.R:38:10:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/expected.R#L38) *warning:* **no visible global function definition for ‘pm_sad’**
```r
  aux <- pm_sad(theta, I, J)
         ^~~~~~
```
[R/expected.R:39:10:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/expected.R#L39) *warning:* **no visible global function definition for ‘sort_aux’**
```r
  sad <- sort_aux(aux)
         ^~~~~~~~
```
[R/expected.R:43:1:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/expected.R#L43) *style:* **Words within variable and function names should be separated by '_' rather than '.'.**
```r
expected.SAD.Guilds <- function(theta, alpha_x, alpha_y,
^~~~~~~~~~~~~~~~~~~
```
[R/expected.R:49:8:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/expected.R#L49) *warning:* **no visible global function definition for ‘draw_local’**
```r
		M <- draw_local(theta, alpha_x, alpha_y, J)
       ^~~~~~~~~~
```
[R/expected.R:49:19:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/expected.R#L49) *style:* **Put spaces around all infix operators.**
```r
		M <- draw_local(theta, alpha_x, alpha_y, J)
                 ~^~~
```
[R/expected.R:50:21:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/expected.R#L50) *style:* **Place a space before left parenthesis, except in a function call.**
```r
		for (m in seq_along(M$guildX)) {
                    ^
```
[R/expected.R:50:39:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/expected.R#L50) *style:* **Variable and function names should be all lowercase.**
```r
		for (m in seq_along(M$guildX)) {
                                      ^~~~~~
```
[R/expected.R:51:34:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/expected.R#L51) *style:* **Put spaces around all infix operators.**
```r
			meanx[m] <- meanx[m] + M$guildX[m]
                                ~^~~
```
[R/expected.R:51:50:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/expected.R#L51) *style:* **Variable and function names should be all lowercase.**
```r
			meanx[m] <- meanx[m] + M$guildX[m]
                                                 ^~~~~~
```
[R/expected.R:53:21:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/expected.R#L53) *style:* **Place a space before left parenthesis, except in a function call.**
```r
		for (m in seq_along(M$guildY)) {
                    ^
```
[R/expected.R:53:39:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/expected.R#L53) *style:* **Variable and function names should be all lowercase.**
```r
		for (m in seq_along(M$guildY)) {
                                      ^~~~~~
```
[R/expected.R:54:34:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/expected.R#L54) *style:* **Put spaces around all infix operators.**
```r
			meany[m] <- meany[m] + M$guildY[m]
                                ~^~~
```
[R/expected.R:54:50:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/expected.R#L54) *style:* **Variable and function names should be all lowercase.**
```r
			meany[m] <- meany[m] + M$guildY[m]
                                                 ^~~~~~
```
[R/expected.R:60:9:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/expected.R#L60) *warning:* **no visible global function definition for ‘sort_aux’**
```r
  gx <- sort_aux(meanx)
        ^~~~~~~~
```
[R/expected.R:61:9:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/expected.R#L61) *warning:* **no visible global function definition for ‘sort_aux’**
```r
  gy <- sort_aux(meany)
        ^~~~~~~~
```
[R/expected.R:62:1:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/expected.R#L62) *style:* **Trailing whitespace is superfluous.**
```r

^~
```
[R/expected.R:67:1:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/expected.R#L67) *style:* **Words within variable and function names should be separated by '_' rather than '.'.**
```r
expected.SAD.Guilds.Conditional <- function(theta,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/expected.R:67:1:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/expected.R#L67) *style:* **Variable and function names should not be longer than 30 characters.**
```r
expected.SAD.Guilds.Conditional <- function(theta,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
[R/expected.R:73:18:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/expected.R#L73) *style:* **Commas should always have a space after.**
```r
  meanx <- rep(0,Jx)
                 ^
```
[R/expected.R:74:18:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/expected.R#L74) *style:* **Commas should always have a space after.**
```r
  meany <- rep(0,Jy)
                 ^
```
[R/expected.R:77:8:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/expected.R#L77) *warning:* **no visible global function definition for ‘draw_local_cond’**
```r
		M <- draw_local_cond(theta, alpha_x, alpha_y, Jx, Jy)
       ^~~~~~~~~~~~~~~
```
[R/expected.R:77:19:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/expected.R#L77) *style:* **Put spaces around all infix operators.**
```r
		M <- draw_local_cond(theta, alpha_x, alpha_y, Jx, Jy)
                 ~^~~
```
[R/expected.R:78:21:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/expected.R#L78) *style:* **Place a space before left parenthesis, except in a function call.**
```r
		for (m in seq_along(M$guildX)) {
                    ^
```
[R/expected.R:78:39:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/expected.R#L78) *style:* **Variable and function names should be all lowercase.**
```r
		for (m in seq_along(M$guildX)) {
                                      ^~~~~~
```
[R/expected.R:79:34:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/expected.R#L79) *style:* **Put spaces around all infix operators.**
```r
			meanx[m] <- meanx[m] + M$guildX[m]
                                ~^~~
```
[R/expected.R:79:50:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/expected.R#L79) *style:* **Variable and function names should be all lowercase.**
```r
			meanx[m] <- meanx[m] + M$guildX[m]
                                                 ^~~~~~
```
[R/expected.R:81:21:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/expected.R#L81) *style:* **Place a space before left parenthesis, except in a function call.**
```r
		for (m in seq_along(M$guildY)) {
                    ^
```
[R/expected.R:81:39:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/expected.R#L81) *style:* **Variable and function names should be all lowercase.**
```r
		for (m in seq_along(M$guildY)) {
                                      ^~~~~~
```
[R/expected.R:82:34:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/expected.R#L82) *style:* **Put spaces around all infix operators.**
```r
			meany[m] <- meany[m] + M$guildY[m]
                                ~^~~
```
[R/expected.R:82:50:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/expected.R#L82) *style:* **Variable and function names should be all lowercase.**
```r
			meany[m] <- meany[m] + M$guildY[m]
                                                 ^~~~~~
```
[R/expected.R:88:9:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/expected.R#L88) *warning:* **no visible global function definition for ‘sort_aux’**
```r
  gx <- sort_aux(meanx)
        ^~~~~~~~
```
[R/expected.R:89:9:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/expected.R#L89) *warning:* **no visible global function definition for ‘sort_aux’**
```r
  gy <- sort_aux(meany)
        ^~~~~~~~
```
[R/expected.R:90:1:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/expected.R#L90) *style:* **Trailing whitespace is superfluous.**
```r

^~
```
[R/generateData.R:2:5:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/generateData.R#L2) *style:* **Place a space before left parenthesis, except in a function call.**
```r
  if(theta < 1) {
    ^
```
[R/generateData.R:6:5:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/generateData.R#L6) *style:* **Place a space before left parenthesis, except in a function call.**
```r
  if(alpha_x < 0) {
    ^
```
[R/generateData.R:10:5:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/generateData.R#L10) *style:* **Place a space before left parenthesis, except in a function call.**
```r
  if(alpha_y < 0) {
    ^
```
[R/generateData.R:14:5:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/generateData.R#L14) *style:* **Place a space before left parenthesis, except in a function call.**
```r
  if(alpha_x > 1) {
    ^
```
[R/generateData.R:18:5:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/generateData.R#L18) *style:* **Place a space before left parenthesis, except in a function call.**
```r
  if(alpha_y > 1) {
    ^
```
[R/generateData.R:22:1:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/generateData.R#L22) *style:* **Trailing whitespace is superfluous.**
```r

^~
```
[R/generateData.R:23:5:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/generateData.R#L23) *style:* **Place a space before left parenthesis, except in a function call.**
```r
  if(J < 0) {
    ^
```
[R/generateData.R:28:3:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/generateData.R#L28) *warning:* **local variable ‘SADX’ assigned but may not be used**
```r
  SADX <- c()
  ^~~~
```
[R/generateData.R:29:3:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/generateData.R#L29) *warning:* **local variable ‘SADY’ assigned but may not be used**
```r
  SADY <- c()
  ^~~~
```
[R/generateData.R:36:27:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/generateData.R#L36) *style:* **Put spaces around all infix operators.**
```r
  I_X <- alpha_x * nx * (J-1) / (1 - alpha_x * nx - alpha_y * ny)
                         ~^~
```
[R/generateData.R:36:66:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/generateData.R#L36) *style:* **Trailing whitespace is superfluous.**
```r
  I_X <- alpha_x * nx * (J-1) / (1 - alpha_x * nx - alpha_y * ny)
                                                                 ^
```
[R/generateData.R:37:27:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/generateData.R#L37) *style:* **Put spaces around all infix operators.**
```r
  I_Y <- alpha_y * ny * (J-1) / (1 - alpha_x * nx - alpha_y * ny)
                         ~^~
```
[R/generateData.R:40:3:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/generateData.R#L40) *style:* **Variable and function names should be all lowercase.**
```r
  allN <- 0:J
  ^~~~
```
[R/generateData.R:41:5:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/generateData.R#L41) *style:* **Place a space before left parenthesis, except in a function call.**
```r
  if(is.infinite(I_X) && is.infinite(I_Y)) {
    ^
```
[R/generateData.R:42:18:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/generateData.R#L42) *style:* **Do not place spaces around code in parentheses or square brackets.**
```r
     probs <- exp( lgamma(J+1) -
                 ^
```
[R/generateData.R:42:28:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/generateData.R#L42) *style:* **Put spaces around all infix operators.**
```r
     probs <- exp( lgamma(J+1) -
                          ~^~
```
[R/generateData.R:42:33:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/generateData.R#L42) *style:* **Trailing whitespace is superfluous.**
```r
     probs <- exp( lgamma(J+1) -
                                ^
```
[R/generateData.R:43:26:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/generateData.R#L43) *style:* **Variable and function names should be all lowercase.**
```r
                 (lgamma(allN + 1) +
                         ^~~~
```
[R/generateData.R:43:37:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/generateData.R#L43) *style:* **Trailing whitespace is superfluous.**
```r
                 (lgamma(allN + 1) +
                                    ^
```
[R/generateData.R:44:30:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/generateData.R#L44) *style:* **Variable and function names should be all lowercase.**
```r
                  lgamma(J - allN + 1)) +
                             ^~~~
```
[R/generateData.R:44:42:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/generateData.R#L44) *style:* **Trailing whitespace is superfluous.**
```r
                  lgamma(J - allN + 1)) +
                                         ^
```
[R/generateData.R:45:19:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/generateData.R#L45) *style:* **Variable and function names should be all lowercase.**
```r
                  allN * log(nx) +
                  ^~~~
```
[R/generateData.R:45:35:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/generateData.R#L45) *style:* **Trailing whitespace is superfluous.**
```r
                  allN * log(nx) +
                                  ^
```
[R/generateData.R:46:20:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/generateData.R#L46) *style:* **Put spaces around all infix operators.**
```r
                 (J-allN) * log(ny))
                  ~^~
```
[R/generateData.R:46:21:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/generateData.R#L46) *style:* **Variable and function names should be all lowercase.**
```r
                 (J-allN) * log(ny))
                    ^~~~
```
[R/generateData.R:49:14:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/generateData.R#L49) *warning:* **no visible global function definition for ‘polyaeggenberger’**
```r
    probs <- polyaeggenberger(I_X, I_Y, J, allN)
             ^~~~~~~~~~~~~~~~
```
[R/generateData.R:49:44:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/generateData.R#L49) *style:* **Variable and function names should be all lowercase.**
```r
    probs <- polyaeggenberger(I_X, I_Y, J, allN)
                                           ^~~~
```
[R/generateData.R:49:49:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/generateData.R#L49) *style:* **Trailing whitespace is superfluous.**
```r
    probs <- polyaeggenberger(I_X, I_Y, J, allN)
                                                ^
```
[R/generateData.R:55:11:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/generateData.R#L55) *warning:* **no visible global function definition for ‘generate.ZSM’**
```r
  sadx <- generate.ZSM(theta, I_X, NX)
          ^~~~~~~~~~~~
```
[R/generateData.R:56:11:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/generateData.R#L56) *warning:* **no visible global function definition for ‘generate.ZSM’**
```r
  sady <- generate.ZSM(theta, I_Y, NY)
          ^~~~~~~~~~~~
```
[R/generateData.R:58:17:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/generateData.R#L58) *style:* **Do not place spaces around code in parentheses or square brackets.**
```r
  output <- list( guildX = sadx, guildY = sady)
                ^
```
[R/generateData.R:59:1:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/generateData.R#L59) *style:* **Trailing whitespace is superfluous.**
```r

^~
```
[R/generateData.R:64:38:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/generateData.R#L64) *style:* **Commas should always have a space after.**
```r
polyaeggenberger <- function(theta_x,theta_y,J,N) {
                                     ^
```
[R/generateData.R:64:46:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/generateData.R#L64) *style:* **Commas should always have a space after.**
```r
polyaeggenberger <- function(theta_x,theta_y,J,N) {
                                             ^
```
[R/generateData.R:64:48:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/generateData.R#L64) *style:* **Commas should always have a space after.**
```r
polyaeggenberger <- function(theta_x,theta_y,J,N) {
                                               ^
```
[R/generateData.R:66:39:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/generateData.R#L66) *style:* **Trailing whitespace is superfluous.**
```r
  b <- lgamma(theta_x + theta_y + J) -
                                      ^
```
[R/generateData.R:68:1:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/generateData.R#L68) *style:* **Trailing whitespace is superfluous.**
```r

^~
```
[R/generateData.R:71:32:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/generateData.R#L71) *style:* **Put spaces around all infix operators.**
```r
  d <- lgamma(N + 1) + lgamma(J-N+1)
                              ~^~
```
[R/generateData.R:71:34:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/generateData.R#L71) *style:* **Put spaces around all infix operators.**
```r
  d <- lgamma(N + 1) + lgamma(J-N+1)
                                ~^~
```
[R/generateData.R:72:1:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/generateData.R#L72) *style:* **Trailing whitespace is superfluous.**
```r

^~
```
[R/generateData.R:76:1:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/generateData.R#L76) *style:* **Variable and function names should be all lowercase.**
```r
localComm <- function(alpha_x, alpha_y, Jx, Jy, px) {
^~~~~~~~~
```
[R/generateData.R:82:27:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/generateData.R#L82) *style:* **Put spaces around all infix operators.**
```r
  I_X <- alpha_x * nx * (J-1) / (1 - alpha_x * nx - alpha_y * ny)
                         ~^~
```
[R/generateData.R:82:66:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/generateData.R#L82) *style:* **Trailing whitespace is superfluous.**
```r
  I_X <- alpha_x * nx * (J-1) / (1 - alpha_x * nx - alpha_y * ny)
                                                                 ^
```
[R/generateData.R:83:27:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/generateData.R#L83) *style:* **Put spaces around all infix operators.**
```r
  I_Y <- alpha_y * ny * (J-1) / (1 - alpha_x * nx - alpha_y * ny)
                         ~^~
```
[R/generateData.R:85:4:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/generateData.R#L85) *style:* **Place a space before left parenthesis, except in a function call.**
```r
 if(is.infinite(I_X) && is.infinite(I_Y)) {
   ^
```
[R/generateData.R:86:29:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/generateData.R#L86) *style:* **Put spaces around all infix operators.**
```r
     output <- exp( lgamma(J+1) -
                           ~^~
```
[R/generateData.R:86:34:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/generateData.R#L86) *style:* **Trailing whitespace is superfluous.**
```r
     output <- exp( lgamma(J+1) -
                                 ^
```
[R/generateData.R:87:36:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/generateData.R#L87) *style:* **Trailing whitespace is superfluous.**
```r
                  (lgamma(Jx + 1) +
                                   ^
```
[R/generateData.R:89:35:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/generateData.R#L89) *style:* **Trailing whitespace is superfluous.**
```r
                    Jx * log(nx) +
                                  ^
```
[R/generateData.R:90:23:](https://github.com/thijsjanzen/GUILDS/blob/e8c6beed0a5ee16757d4745ebc9b2e7522d9af6e/R/generateData.R#L90) *style:* **Put spaces around all infix operators.**
```r
                    (J-Jx) * log(ny))
                     ~^~
```


TaskCluster-GitHub: https://tools.taskcluster.net/task-graph-inspector/#ZRQbGCKuRgOTIzVyMTfKpg


Sure thing! 😅


Removing `'use strict'` prevents `nodemailer-mock` from working in Node 4 without a flag (which in some environments is not possible to set)

```

Any chance you could put these back in?


Hi Aaron,

Thanks for your note. Yes, my sole motivation for using continuous integration services like travis and circle is to check my analysis code. Mostly it catches basic things like a missing para or period, and sometimes more complicated things. And saves me from using my computer resources to test after each commit. Fully worth the few mins of effort to setup at the start of a project, in my opinion.

I'd love to have a look at your repo of that's OK. I'm always open to new ideas for tooling research compendia!


Ramon Navarro Bosch your emails are not known to GithHb and thus it is impossible to know if you have signed the Plone Contributor Agreement, which is required to merge this pull request.

Learn about the Plone Contributor Agreement: http://docs.plone.org/develop/coredev/docs/contributors_agreement_explained.html How to add more emails to your GitHub account: https://help.github.com/articles/adding-an-email-address-to-your-github-account/