{"comment":{"url":"https://api.github.com/repos/richelbilderbeek/Cer2016/comments/18520332","html_url":"https://github.com/richelbilderbeek/Cer2016/commit/9f2067bd7373d44efe51eb8def54c9ab38981084#commitcomment-18520332","id":18520332,"user":{"login":"lintr-bot","id":10925265,"avatar_url":"https://avatars.githubusercontent.com/u/10925265?v=3","gravatar_id":"","url":"https://api.github.com/users/lintr-bot","html_url":"https://github.com/lintr-bot","followers_url":"https://api.github.com/users/lintr-bot/followers","following_url":"https://api.github.com/users/lintr-bot/following{/other_user}","gists_url":"https://api.github.com/users/lintr-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/lintr-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lintr-bot/subscriptions","organizations_url":"https://api.github.com/users/lintr-bot/orgs","repos_url":"https://api.github.com/users/lintr-bot/repos","events_url":"https://api.github.com/users/lintr-bot/events{/privacy}","received_events_url":"https://api.github.com/users/lintr-bot/received_events","type":"User","site_admin":false},"position":null,"line":null,"path":null,"commit_id":"9f2067bd7373d44efe51eb8def54c9ab38981084","created_at":"2016-08-04T14:06:05Z","updated_at":"2016-08-04T14:06:05Z","body":"[R/calc_ess.R:20:19:](https://github.com/richelbilderbeek/Cer2016/blob/9f2067bd7373d44efe51eb8def54c9ab38981084/R/calc_ess.R#L20) *style:* **Commented code should be removed.**\n```r\n​#                 squareLaggedSums[lagIndex] = squareLaggedSums[lagIndex] + trace[i - lagIndex] * trace[i];\n                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n```\n[R/calc_ess.R:25:19:](https://github.com/richelbilderbeek/Cer2016/blob/9f2067bd7373d44efe51eb8def54c9ab38981084/R/calc_ess.R#L25) *style:* **Commented code should be removed.**\n```r\n​#                 autoCorrelation[lagIndex] = squareLaggedSums[lagIndex] - (sum1 + sum2) * mean + mean * mean * (i + 1 - lagIndex);\n                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n```\n[R/calc_ess.R:36:19:](https://github.com/richelbilderbeek/Cer2016/blob/9f2067bd7373d44efe51eb8def54c9ab38981084/R/calc_ess.R#L36) *style:* **Commented code should be removed.**\n```r\n​#                 integralOfACFunctionTimes2 = autoCorrelation[0];\n                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n```\n[R/calc_ess.R:57:29:](https://github.com/richelbilderbeek/Cer2016/blob/9f2067bd7373d44efe51eb8def54c9ab38981084/R/calc_ess.R#L57) *style:* **Variable and function names should be all lowercase.**\n```r\n​calc_act <- function(trace, sampleInterval) {\n                            ^~~~~~~~~~~~~~\n```\n[R/calc_ess.R:63:1:](https://github.com/richelbilderbeek/Cer2016/blob/9f2067bd7373d44efe51eb8def54c9ab38981084/R/calc_ess.R#L63) *style:* **lines should not be more than 80 characters.**\n```r\n​  #  keep track of sums of trace(i)*trace(i_+ lag) for all lags, excluding burn-in\n^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n```\n[R/calc_ess.R:64:3:](https://github.com/richelbilderbeek/Cer2016/blob/9f2067bd7373d44efe51eb8def54c9ab38981084/R/calc_ess.R#L64) *style:* **Variable and function names should be all lowercase.**\n```r\n​  squareLaggedSums <- rep(0.0, times = MAX_LAG)\n  ^~~~~~~~~~~~~~~~\n```\n[R/calc_ess.R:65:3:](https://github.com/richelbilderbeek/Cer2016/blob/9f2067bd7373d44efe51eb8def54c9ab38981084/R/calc_ess.R#L65) *style:* **Variable and function names should be all lowercase.**\n```r\n​  autoCorrelation <- rep(0.0, times = MAX_LAG)\n  ^~~~~~~~~~~~~~~\n```\n[R/calc_ess.R:80:10:](https://github.com/richelbilderbeek/Cer2016/blob/9f2067bd7373d44efe51eb8def54c9ab38981084/R/calc_ess.R#L80) *style:* **Variable and function names should be all lowercase.**\n```r\n​    for (lagIndex in seq(0, min(i + 1, MAX_LAG) - 1)) {\n         ^~~~~~~~\n```\n[R/calc_ess.R:81:22:](https://github.com/richelbilderbeek/Cer2016/blob/9f2067bd7373d44efe51eb8def54c9ab38981084/R/calc_ess.R#L81) *style:* **Variable and function names should be all lowercase.**\n```r\n​      testit::assert(lagIndex + 1 >= 1)\n                     ^~~~~~~~\n```\n[R/calc_ess.R:82:22:](https://github.com/richelbilderbeek/Cer2016/blob/9f2067bd7373d44efe51eb8def54c9ab38981084/R/calc_ess.R#L82) *style:* **Variable and function names should be all lowercase.**\n```r\n​      testit::assert(lagIndex + 1 <= length(squareLaggedSums))\n                     ^~~~~~~~\n```\n[R/calc_ess.R:82:45:](https://github.com/richelbilderbeek/Cer2016/blob/9f2067bd7373d44efe51eb8def54c9ab38981084/R/calc_ess.R#L82) *style:* **Variable and function names should be all lowercase.**\n```r\n​      testit::assert(lagIndex + 1 <= length(squareLaggedSums))\n                                            ^~~~~~~~~~~~~~~~\n```\n[R/calc_ess.R:85:26:](https://github.com/richelbilderbeek/Cer2016/blob/9f2067bd7373d44efe51eb8def54c9ab38981084/R/calc_ess.R#L85) *style:* **Variable and function names should be all lowercase.**\n```r\n​      testit::assert(i - lagIndex + 1 >= 1)\n                         ^~~~~~~~\n```\n[R/calc_ess.R:86:26:](https://github.com/richelbilderbeek/Cer2016/blob/9f2067bd7373d44efe51eb8def54c9ab38981084/R/calc_ess.R#L86) *style:* **Variable and function names should be all lowercase.**\n```r\n​      testit::assert(i - lagIndex + 1 <= length(trace))\n                         ^~~~~~~~\n```\n[R/calc_ess.R:87:22:](https://github.com/richelbilderbeek/Cer2016/blob/9f2067bd7373d44efe51eb8def54c9ab38981084/R/calc_ess.R#L87) *style:* **Variable and function names should be all lowercase.**\n```r\n​      testit::assert(lagIndex + 1 <= length(trace))\n                     ^~~~~~~~\n```\n[R/calc_ess.R:88:7:](https://github.com/richelbilderbeek/Cer2016/blob/9f2067bd7373d44efe51eb8def54c9ab38981084/R/calc_ess.R#L88) *style:* **Variable and function names should be all lowercase.**\n```r\n​      squareLaggedSums[lagIndex + 1] <- squareLaggedSums[lagIndex + 1] +\n      ^~~~~~~~~~~~~~~~\n```\n[R/calc_ess.R:88:24:](https://github.com/richelbilderbeek/Cer2016/blob/9f2067bd7373d44efe51eb8def54c9ab38981084/R/calc_ess.R#L88) *style:* **Variable and function names should be all lowercase.**\n```r\n​      squareLaggedSums[lagIndex + 1] <- squareLaggedSums[lagIndex + 1] +\n                       ^~~~~~~~\n```\n[R/calc_ess.R:88:41:](https://github.com/richelbilderbeek/Cer2016/blob/9f2067bd7373d44efe51eb8def54c9ab38981084/R/calc_ess.R#L88) *style:* **Variable and function names should be all lowercase.**\n```r\n​      squareLaggedSums[lagIndex + 1] <- squareLaggedSums[lagIndex + 1] +\n                                        ^~~~~~~~~~~~~~~~\n```\n[R/calc_ess.R:88:58:](https://github.com/richelbilderbeek/Cer2016/blob/9f2067bd7373d44efe51eb8def54c9ab38981084/R/calc_ess.R#L88) *style:* **Variable and function names should be all lowercase.**\n```r\n​      squareLaggedSums[lagIndex + 1] <- squareLaggedSums[lagIndex + 1] +\n                                                         ^~~~~~~~\n```\n[R/calc_ess.R:89:19:](https://github.com/richelbilderbeek/Cer2016/blob/9f2067bd7373d44efe51eb8def54c9ab38981084/R/calc_ess.R#L89) *style:* **Variable and function names should be all lowercase.**\n```r\n​        trace[i - lagIndex + 1] * trace[i + 1]\n                  ^~~~~~~~\n```\n[R/calc_ess.R:91:1:](https://github.com/richelbilderbeek/Cer2016/blob/9f2067bd7373d44efe51eb8def54c9ab38981084/R/calc_ess.R#L91) *style:* **lines should not be more than 80 characters.**\n```r\n​      # (valid since mean *(samples - lag), sum1, and sum2 are approximately the same)\n^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n```\n[R/calc_ess.R:93:9:](https://github.com/richelbilderbeek/Cer2016/blob/9f2067bd7373d44efe51eb8def54c9ab38981084/R/calc_ess.R#L93) *style:* **Commented code should be removed.**\n```r\n​      # autoCorrelation[lag] = m_fSquareLaggedSums.get(lag) - sum1 * sum2\n        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n```\n[R/calc_ess.R:94:22:](https://github.com/richelbilderbeek/Cer2016/blob/9f2067bd7373d44efe51eb8def54c9ab38981084/R/calc_ess.R#L94) *style:* **Variable and function names should be all lowercase.**\n```r\n​      testit::assert(lagIndex + 1 >= 1)\n                     ^~~~~~~~\n```\n[R/calc_ess.R:95:22:](https://github.com/richelbilderbeek/Cer2016/blob/9f2067bd7373d44efe51eb8def54c9ab38981084/R/calc_ess.R#L95) *style:* **Variable and function names should be all lowercase.**\n```r\n​      testit::assert(lagIndex + 1 <= length(autoCorrelation))\n                     ^~~~~~~~\n```\n[R/calc_ess.R:95:45:](https://github.com/richelbilderbeek/Cer2016/blob/9f2067bd7373d44efe51eb8def54c9ab38981084/R/calc_ess.R#L95) *style:* **Variable and function names should be all lowercase.**\n```r\n​      testit::assert(lagIndex + 1 <= length(autoCorrelation))\n                                            ^~~~~~~~~~~~~~~\n```\n[R/calc_ess.R:98:30:](https://github.com/richelbilderbeek/Cer2016/blob/9f2067bd7373d44efe51eb8def54c9ab38981084/R/calc_ess.R#L98) *style:* **Variable and function names should be all lowercase.**\n```r\n​      testit::assert(i + 1 - lagIndex != 0)\n                             ^~~~~~~~\n```\n[R/calc_ess.R:100:32:](https://github.com/richelbilderbeek/Cer2016/blob/9f2067bd7373d44efe51eb8def54c9ab38981084/R/calc_ess.R#L100) *style:* **Variable and function names should be all lowercase.**\n```r\n​      sum1 <- sum1 - trace[i - lagIndex + 1]\n                               ^~~~~~~~\n```\n[R/calc_ess.R:101:28:](https://github.com/richelbilderbeek/Cer2016/blob/9f2067bd7373d44efe51eb8def54c9ab38981084/R/calc_ess.R#L101) *style:* **Variable and function names should be all lowercase.**\n```r\n​      sum2 <- sum2 - trace[lagIndex + 1]\n                           ^~~~~~~~\n```\n[R/calc_ess.R:105:3:](https://github.com/richelbilderbeek/Cer2016/blob/9f2067bd7373d44efe51eb8def54c9ab38981084/R/calc_ess.R#L105) *style:* **Variable and function names should be all lowercase.**\n```r\n​  maxLag <- min(length(trace), MAX_LAG)\n  ^~~~~~\n```\n[R/calc_ess.R:106:3:](https://github.com/richelbilderbeek/Cer2016/blob/9f2067bd7373d44efe51eb8def54c9ab38981084/R/calc_ess.R#L106) *style:* **Variable and function names should be all lowercase.**\n```r\n​  integralOfACFunctionTimes2 <- 0.0\n  ^~~~~~~~~~~~~~~~~~~~~~~~~~\n```\n[R/calc_ess.R:107:8:](https://github.com/richelbilderbeek/Cer2016/blob/9f2067bd7373d44efe51eb8def54c9ab38981084/R/calc_ess.R#L107) *style:* **Variable and function names should be all lowercase.**\n```r\n​  for (lagIndex in seq(0, maxLag - 1)) {\n       ^~~~~~~~\n```\n[R/calc_ess.R:107:27:](https://github.com/richelbilderbeek/Cer2016/blob/9f2067bd7373d44efe51eb8def54c9ab38981084/R/calc_ess.R#L107) *style:* **Variable and function names should be all lowercase.**\n```r\n​  for (lagIndex in seq(0, maxLag - 1)) {\n                          ^~~~~~\n```\n[R/calc_ess.R:108:9:](https://github.com/richelbilderbeek/Cer2016/blob/9f2067bd7373d44efe51eb8def54c9ab38981084/R/calc_ess.R#L108) *style:* **Variable and function names should be all lowercase.**\n```r\n​    if (lagIndex == 0) {\n        ^~~~~~~~\n```\n[R/calc_ess.R:109:7:](https://github.com/richelbilderbeek/Cer2016/blob/9f2067bd7373d44efe51eb8def54c9ab38981084/R/calc_ess.R#L109) *style:* **Variable and function names should be all lowercase.**\n```r\n​      integralOfACFunctionTimes2 <- autoCorrelation[0 + 1]\n      ^~~~~~~~~~~~~~~~~~~~~~~~~~\n```\n[R/calc_ess.R:109:37:](https://github.com/richelbilderbeek/Cer2016/blob/9f2067bd7373d44efe51eb8def54c9ab38981084/R/calc_ess.R#L109) *style:* **Variable and function names should be all lowercase.**\n```r\n​      integralOfACFunctionTimes2 <- autoCorrelation[0 + 1]\n                                    ^~~~~~~~~~~~~~~\n```\n[R/calc_ess.R:110:16:](https://github.com/richelbilderbeek/Cer2016/blob/9f2067bd7373d44efe51eb8def54c9ab38981084/R/calc_ess.R#L110) *style:* **Variable and function names should be all lowercase.**\n```r\n​    } else if (lagIndex %% 2 == 0) {\n               ^~~~~~~~\n```\n[R/calc_ess.R:112:1:](https://github.com/richelbilderbeek/Cer2016/blob/9f2067bd7373d44efe51eb8def54c9ab38981084/R/calc_ess.R#L112) *style:* **lines should not be more than 80 characters.**\n```r\n​      if (autoCorrelation[lagIndex - 1 + 1] + autoCorrelation[lagIndex + 1] > 0) {\n^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n```\n[R/calc_ess.R:112:11:](https://github.com/richelbilderbeek/Cer2016/blob/9f2067bd7373d44efe51eb8def54c9ab38981084/R/calc_ess.R#L112) *style:* **Variable and function names should be all lowercase.**\n```r\n​      if (autoCorrelation[lagIndex - 1 + 1] + autoCorrelation[lagIndex + 1] > 0) {\n          ^~~~~~~~~~~~~~~\n```\n[R/calc_ess.R:112:27:](https://github.com/richelbilderbeek/Cer2016/blob/9f2067bd7373d44efe51eb8def54c9ab38981084/R/calc_ess.R#L112) *style:* **Variable and function names should be all lowercase.**\n```r\n​      if (autoCorrelation[lagIndex - 1 + 1] + autoCorrelation[lagIndex + 1] > 0) {\n                          ^~~~~~~~\n```\n[R/calc_ess.R:112:47:](https://github.com/richelbilderbeek/Cer2016/blob/9f2067bd7373d44efe51eb8def54c9ab38981084/R/calc_ess.R#L112) *style:* **Variable and function names should be all lowercase.**\n```r\n​      if (autoCorrelation[lagIndex - 1 + 1] + autoCorrelation[lagIndex + 1] > 0) {\n                                              ^~~~~~~~~~~~~~~\n```\n[R/calc_ess.R:112:63:](https://github.com/richelbilderbeek/Cer2016/blob/9f2067bd7373d44efe51eb8def54c9ab38981084/R/calc_ess.R#L112) *style:* **Variable and function names should be all lowercase.**\n```r\n​      if (autoCorrelation[lagIndex - 1 + 1] + autoCorrelation[lagIndex + 1] > 0) {\n                                                              ^~~~~~~~\n```\n[R/calc_ess.R:113:1:](https://github.com/richelbilderbeek/Cer2016/blob/9f2067bd7373d44efe51eb8def54c9ab38981084/R/calc_ess.R#L113) *style:* **lines should not be more than 80 characters.**\n```r\n​        integralOfACFunctionTimes2 <- integralOfACFunctionTimes2 + (2.0 * (autoCorrelation[lagIndex - 1 + 1] + autoCorrelation[lagIndex + 1]))\n^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n```\n[R/calc_ess.R:113:9:](https://github.com/richelbilderbeek/Cer2016/blob/9f2067bd7373d44efe51eb8def54c9ab38981084/R/calc_ess.R#L113) *style:* **Variable and function names should be all lowercase.**\n```r\n​        integralOfACFunctionTimes2 <- integralOfACFunctionTimes2 + (2.0 * (autoCorrelation[lagIndex - 1 + 1] + autoCorrelation[lagIndex + 1]))\n        ^~~~~~~~~~~~~~~~~~~~~~~~~~\n```\n[R/calc_ess.R:113:39:](https://github.com/richelbilderbeek/Cer2016/blob/9f2067bd7373d44efe51eb8def54c9ab38981084/R/calc_ess.R#L113) *style:* **Variable and function names should be all lowercase.**\n```r\n​        integralOfACFunctionTimes2 <- integralOfACFunctionTimes2 + (2.0 * (autoCorrelation[lagIndex - 1 + 1] + autoCorrelation[lagIndex + 1]))\n                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~\n```\n[R/calc_ess.R:113:76:](https://github.com/richelbilderbeek/Cer2016/blob/9f2067bd7373d44efe51eb8def54c9ab38981084/R/calc_ess.R#L113) *style:* **Variable and function names should be all lowercase.**\n```r\n​        integralOfACFunctionTimes2 <- integralOfACFunctionTimes2 + (2.0 * (autoCorrelation[lagIndex - 1 + 1] + autoCorrelation[lagIndex + 1]))\n                                                                           ^~~~~~~~~~~~~~~\n```\n[R/calc_ess.R:113:92:](https://github.com/richelbilderbeek/Cer2016/blob/9f2067bd7373d44efe51eb8def54c9ab38981084/R/calc_ess.R#L113) *style:* **Variable and function names should be all lowercase.**\n```r\n​        integralOfACFunctionTimes2 <- integralOfACFunctionTimes2 + (2.0 * (autoCorrelation[lagIndex - 1 + 1] + autoCorrelation[lagIndex + 1]))\n                                                                                           ^~~~~~~~\n```\n[R/calc_ess.R:113:112:](https://github.com/richelbilderbeek/Cer2016/blob/9f2067bd7373d44efe51eb8def54c9ab38981084/R/calc_ess.R#L113) *style:* **Variable and function names should be all lowercase.**\n```r\n​        integralOfACFunctionTimes2 <- integralOfACFunctionTimes2 + (2.0 * (autoCorrelation[lagIndex - 1 + 1] + autoCorrelation[lagIndex + 1]))\n                                                                                                               ^~~~~~~~~~~~~~~\n```\n[R/calc_ess.R:113:128:](https://github.com/richelbilderbeek/Cer2016/blob/9f2067bd7373d44efe51eb8def54c9ab38981084/R/calc_ess.R#L113) *style:* **Variable and function names should be all lowercase.**\n```r\n​        integralOfACFunctionTimes2 <- integralOfACFunctionTimes2 + (2.0 * (autoCorrelation[lagIndex - 1 + 1] + autoCorrelation[lagIndex + 1]))\n                                                                                                                               ^~~~~~~~\n```\n[R/calc_ess.R:121:10:](https://github.com/richelbilderbeek/Cer2016/blob/9f2067bd7373d44efe51eb8def54c9ab38981084/R/calc_ess.R#L121) *style:* **Variable and function names should be all lowercase.**\n```r\n​  act <- sampleInterval * integralOfACFunctionTimes2 / autoCorrelation[1]\n         ^~~~~~~~~~~~~~\n```\n[R/calc_ess.R:121:27:](https://github.com/richelbilderbeek/Cer2016/blob/9f2067bd7373d44efe51eb8def54c9ab38981084/R/calc_ess.R#L121) *style:* **Variable and function names should be all lowercase.**\n```r\n​  act <- sampleInterval * integralOfACFunctionTimes2 / autoCorrelation[1]\n                          ^~~~~~~~~~~~~~~~~~~~~~~~~~\n```\n[R/calc_ess.R:121:56:](https://github.com/richelbilderbeek/Cer2016/blob/9f2067bd7373d44efe51eb8def54c9ab38981084/R/calc_ess.R#L121) *style:* **Variable and function names should be all lowercase.**\n```r\n​  act <- sampleInterval * integralOfACFunctionTimes2 / autoCorrelation[1]\n                                                       ^~~~~~~~~~~~~~~\n```\n[R/calc_ess.R:131:29:](https://github.com/richelbilderbeek/Cer2016/blob/9f2067bd7373d44efe51eb8def54c9ab38981084/R/calc_ess.R#L131) *style:* **Variable and function names should be all lowercase.**\n```r\n​calc_ess <- function(trace, sampleInterval) {\n                            ^~~~~~~~~~~~~~\n```\n[R/calc_ess.R:132:10:](https://github.com/richelbilderbeek/Cer2016/blob/9f2067bd7373d44efe51eb8def54c9ab38981084/R/calc_ess.R#L132) *warning:* **no visible global function definition for ‘calc_act’**\n```r\n​  act <- calc_act(trace = trace, sampleInterval = sampleInterval)\n         ^~~~~~~~\n```\n[R/calc_ess.R:132:51:](https://github.com/richelbilderbeek/Cer2016/blob/9f2067bd7373d44efe51eb8def54c9ab38981084/R/calc_ess.R#L132) *style:* **Variable and function names should be all lowercase.**\n```r\n​  act <- calc_act(trace = trace, sampleInterval = sampleInterval)\n                                                  ^~~~~~~~~~~~~~\n```\n[R/calc_ess.R:133:33:](https://github.com/richelbilderbeek/Cer2016/blob/9f2067bd7373d44efe51eb8def54c9ab38981084/R/calc_ess.R#L133) *style:* **Variable and function names should be all lowercase.**\n```r\n​  ess <- length(trace) / (act / sampleInterval)\n                                ^~~~~~~~~~~~~~\n```"}}
{"actor":{"display_login":"lintr-bot"}}