{"comment":{"url":"https://api.github.com/repos/seninp-bioinfo/MetaComp/comments/17031208","html_url":"https://github.com/seninp-bioinfo/MetaComp/commit/782f912cb70b7d79bb69f9065e900fed7c67317d#commitcomment-17031208","id":17031208,"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":"782f912cb70b7d79bb69f9065e900fed7c67317d","created_at":"2016-04-08T20:35:38Z","updated_at":"2016-04-08T20:35:38Z","body":"[R/merge_gottcha_assignments.R:16:9:](https://github.com/seninp-bioinfo/MetaComp/blob/782f912cb70b7d79bb69f9065e900fed7c67317d/R/merge_gottcha_assignments.R#L16) *style:* **Use <-, not =, for assignment.**\n```r\n​  LEVEL = TAXA = NORM_COV = NULL # fix the CRAN note\n        ^\n```\n[R/merge_gottcha_assignments.R:16:16:](https://github.com/seninp-bioinfo/MetaComp/blob/782f912cb70b7d79bb69f9065e900fed7c67317d/R/merge_gottcha_assignments.R#L16) *style:* **Use <-, not =, for assignment.**\n```r\n​  LEVEL = TAXA = NORM_COV = NULL # fix the CRAN note\n               ^\n```\n[R/merge_gottcha_assignments.R:16:27:](https://github.com/seninp-bioinfo/MetaComp/blob/782f912cb70b7d79bb69f9065e900fed7c67317d/R/merge_gottcha_assignments.R#L16) *style:* **Use <-, not =, for assignment.**\n```r\n​  LEVEL = TAXA = NORM_COV = NULL # fix the CRAN note\n                          ^\n```\n[R/plot_gottcha_assignment.R:20:9:](https://github.com/seninp-bioinfo/MetaComp/blob/782f912cb70b7d79bb69f9065e900fed7c67317d/R/plot_gottcha_assignment.R#L20) *style:* **Use <-, not =, for assignment.**\n```r\n​  LEVEL = TAXA = NORM_COV = tool = NULL # fix the CRAN note\n        ^\n```\n[R/plot_gottcha_assignment.R:20:16:](https://github.com/seninp-bioinfo/MetaComp/blob/782f912cb70b7d79bb69f9065e900fed7c67317d/R/plot_gottcha_assignment.R#L20) *style:* **Use <-, not =, for assignment.**\n```r\n​  LEVEL = TAXA = NORM_COV = tool = NULL # fix the CRAN note\n               ^\n```\n[R/plot_gottcha_assignment.R:20:27:](https://github.com/seninp-bioinfo/MetaComp/blob/782f912cb70b7d79bb69f9065e900fed7c67317d/R/plot_gottcha_assignment.R#L20) *style:* **Use <-, not =, for assignment.**\n```r\n​  LEVEL = TAXA = NORM_COV = tool = NULL # fix the CRAN note\n                          ^\n```\n[R/plot_gottcha_assignment.R:20:34:](https://github.com/seninp-bioinfo/MetaComp/blob/782f912cb70b7d79bb69f9065e900fed7c67317d/R/plot_gottcha_assignment.R#L20) *style:* **Use <-, not =, for assignment.**\n```r\n​  LEVEL = TAXA = NORM_COV = tool = NULL # fix the CRAN note\n                                 ^\n```\n[R/plot_gottcha_assignment.R:52:37:](https://github.com/seninp-bioinfo/MetaComp/blob/782f912cb70b7d79bb69f9065e900fed7c67317d/R/plot_gottcha_assignment.R#L52) *style:* **Put spaces around all infix operators.**\n```r\n​              labels = expression(10^-1, 10^0, 10^1, 10^2),\n                                   ~^~\n```\n[R/plot_gottcha_assignment.R:52:44:](https://github.com/seninp-bioinfo/MetaComp/blob/782f912cb70b7d79bb69f9065e900fed7c67317d/R/plot_gottcha_assignment.R#L52) *style:* **Put spaces around all infix operators.**\n```r\n​              labels = expression(10^-1, 10^0, 10^1, 10^2),\n                                          ~^~\n```\n[R/plot_gottcha_assignment.R:52:50:](https://github.com/seninp-bioinfo/MetaComp/blob/782f912cb70b7d79bb69f9065e900fed7c67317d/R/plot_gottcha_assignment.R#L52) *style:* **Put spaces around all infix operators.**\n```r\n​              labels = expression(10^-1, 10^0, 10^1, 10^2),\n                                                ~^~\n```\n[R/plot_gottcha_assignment.R:52:56:](https://github.com/seninp-bioinfo/MetaComp/blob/782f912cb70b7d79bb69f9065e900fed7c67317d/R/plot_gottcha_assignment.R#L52) *style:* **Put spaces around all infix operators.**\n```r\n​              labels = expression(10^-1, 10^0, 10^1, 10^2),\n                                                      ~^~\n```\n[R/plot_merged_assignment.R:20:4:](https://github.com/seninp-bioinfo/MetaComp/blob/782f912cb70b7d79bb69f9065e900fed7c67317d/R/plot_merged_assignment.R#L20) *style:* **Commented code should be removed.**\n```r\n​  #assignment = merged[1:10,]\n   ^~~~~~~~~~~~~~~~~~~~~~~~~~\n```\n[R/plot_merged_assignment.R:21:4:](https://github.com/seninp-bioinfo/MetaComp/blob/782f912cb70b7d79bb69f9065e900fed7c67317d/R/plot_merged_assignment.R#L21) *style:* **Commented code should be removed.**\n```r\n​  #taxonomy_level = \"species\"\n   ^~~~~~~~~~~~~~~~~~~~~~~~~~\n```\n[R/plot_merged_assignment.R:22:4:](https://github.com/seninp-bioinfo/MetaComp/blob/782f912cb70b7d79bb69f9065e900fed7c67317d/R/plot_merged_assignment.R#L22) *style:* **Commented code should be removed.**\n```r\n​  #title = \"GOTTCHA assignment merge test\"\n   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n```\n[R/plot_merged_assignment.R:23:4:](https://github.com/seninp-bioinfo/MetaComp/blob/782f912cb70b7d79bb69f9065e900fed7c67317d/R/plot_merged_assignment.R#L23) *style:* **Commented code should be removed.**\n```r\n​  #filename = \"sandbox/test.png\"\n   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n```\n[R/plot_merged_assignment.R:25:8:](https://github.com/seninp-bioinfo/MetaComp/blob/782f912cb70b7d79bb69f9065e900fed7c67317d/R/plot_merged_assignment.R#L25) *style:* **Use <-, not =, for assignment.**\n```r\n​  TAXA = LEVEL = NORM_COV = value = variable = NULL # fix the CRAN note\n       ^\n```\n[R/plot_merged_assignment.R:25:16:](https://github.com/seninp-bioinfo/MetaComp/blob/782f912cb70b7d79bb69f9065e900fed7c67317d/R/plot_merged_assignment.R#L25) *style:* **Use <-, not =, for assignment.**\n```r\n​  TAXA = LEVEL = NORM_COV = value = variable = NULL # fix the CRAN note\n               ^\n```\n[R/plot_merged_assignment.R:25:18:](https://github.com/seninp-bioinfo/MetaComp/blob/782f912cb70b7d79bb69f9065e900fed7c67317d/R/plot_merged_assignment.R#L25) *warning:* **local variable ‘NORM_COV’ assigned but may not be used**\n```r\n​  TAXA = LEVEL = NORM_COV = value = variable = NULL # fix the CRAN note\n                 ^~~~~~~~\n```\n[R/plot_merged_assignment.R:25:27:](https://github.com/seninp-bioinfo/MetaComp/blob/782f912cb70b7d79bb69f9065e900fed7c67317d/R/plot_merged_assignment.R#L25) *style:* **Use <-, not =, for assignment.**\n```r\n​  TAXA = LEVEL = NORM_COV = value = variable = NULL # fix the CRAN note\n                          ^\n```\n[R/plot_merged_assignment.R:25:35:](https://github.com/seninp-bioinfo/MetaComp/blob/782f912cb70b7d79bb69f9065e900fed7c67317d/R/plot_merged_assignment.R#L25) *style:* **Use <-, not =, for assignment.**\n```r\n​  TAXA = LEVEL = NORM_COV = value = variable = NULL # fix the CRAN note\n                                  ^\n```\n[R/plot_merged_assignment.R:25:46:](https://github.com/seninp-bioinfo/MetaComp/blob/782f912cb70b7d79bb69f9065e900fed7c67317d/R/plot_merged_assignment.R#L25) *style:* **Use <-, not =, for assignment.**\n```r\n​  TAXA = LEVEL = NORM_COV = value = variable = NULL # fix the CRAN note\n                                             ^\n```\n[R/plot_merged_assignment.R:28:65:](https://github.com/seninp-bioinfo/MetaComp/blob/782f912cb70b7d79bb69f9065e900fed7c67317d/R/plot_merged_assignment.R#L28) *style:* **Commas should always have a space after.**\n```r\n​  df <- dplyr::filter(assignment, LEVEL == taxonomy_level)[1:10,]\n                                                                ^\n```\n[R/plot_merged_assignment.R:35:8:](https://github.com/seninp-bioinfo/MetaComp/blob/782f912cb70b7d79bb69f9065e900fed7c67317d/R/plot_merged_assignment.R#L35) *style:* **Commas should always have a space after.**\n```r\n​   df[,i] = df[,i] * 100\n       ^\n```\n[R/plot_merged_assignment.R:35:11:](https://github.com/seninp-bioinfo/MetaComp/blob/782f912cb70b7d79bb69f9065e900fed7c67317d/R/plot_merged_assignment.R#L35) *style:* **Use <-, not =, for assignment.**\n```r\n​   df[,i] = df[,i] * 100\n          ^\n```\n[R/plot_merged_assignment.R:35:17:](https://github.com/seninp-bioinfo/MetaComp/blob/782f912cb70b7d79bb69f9065e900fed7c67317d/R/plot_merged_assignment.R#L35) *style:* **Commas should always have a space after.**\n```r\n​   df[,i] = df[,i] * 100\n                ^\n```\n[R/plot_merged_assignment.R:39:55:](https://github.com/seninp-bioinfo/MetaComp/blob/782f912cb70b7d79bb69f9065e900fed7c67317d/R/plot_merged_assignment.R#L39) *style:* **Opening curly braces should never go on their own line and should always be followed by a new line.**\n```r\n​  df$sum <- plyr::daply(df, plyr::.(TAXA), function(x){ sum(x[-1]) / (length(x) - 1)})\n                                                      ^\n```\n[R/plot_merged_assignment.R:39:85:](https://github.com/seninp-bioinfo/MetaComp/blob/782f912cb70b7d79bb69f9065e900fed7c67317d/R/plot_merged_assignment.R#L39) *style:* **Closing curly-braces should always be on their own line, unless it's followed by an else.**\n```r\n​  df$sum <- plyr::daply(df, plyr::.(TAXA), function(x){ sum(x[-1]) / (length(x) - 1)})\n                                                                                    ^\n```\n[R/plot_merged_assignment.R:60:41:](https://github.com/seninp-bioinfo/MetaComp/blob/782f912cb70b7d79bb69f9065e900fed7c67317d/R/plot_merged_assignment.R#L60) *style:* **Put spaces around all infix operators.**\n```r\n​                  labels = expression(10^-1, 10^0, 10^1, 10^2),\n                                       ~^~\n```\n[R/plot_merged_assignment.R:60:48:](https://github.com/seninp-bioinfo/MetaComp/blob/782f912cb70b7d79bb69f9065e900fed7c67317d/R/plot_merged_assignment.R#L60) *style:* **Put spaces around all infix operators.**\n```r\n​                  labels = expression(10^-1, 10^0, 10^1, 10^2),\n                                              ~^~\n```\n[R/plot_merged_assignment.R:60:54:](https://github.com/seninp-bioinfo/MetaComp/blob/782f912cb70b7d79bb69f9065e900fed7c67317d/R/plot_merged_assignment.R#L60) *style:* **Put spaces around all infix operators.**\n```r\n​                  labels = expression(10^-1, 10^0, 10^1, 10^2),\n                                                    ~^~\n```\n[R/plot_merged_assignment.R:60:60:](https://github.com/seninp-bioinfo/MetaComp/blob/782f912cb70b7d79bb69f9065e900fed7c67317d/R/plot_merged_assignment.R#L60) *style:* **Put spaces around all infix operators.**\n```r\n​                  labels = expression(10^-1, 10^0, 10^1, 10^2),\n                                                          ~^~\n```\n[R/plot_merged_assignment.R:67:1:](https://github.com/seninp-bioinfo/MetaComp/blob/782f912cb70b7d79bb69f9065e900fed7c67317d/R/plot_merged_assignment.R#L67) *style:* **lines should not be more than 100 characters.**\n```r\n​                   axis.title.x = ggplot2::element_text(size = 0), axis.title.y = ggplot2::element_blank(),\n^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n```\n[R/plot_merged_assignment.R:68:1:](https://github.com/seninp-bioinfo/MetaComp/blob/782f912cb70b7d79bb69f9065e900fed7c67317d/R/plot_merged_assignment.R#L68) *style:* **lines should not be more than 100 characters.**\n```r\n​                   axis.text.x = ggplot2::element_text(size = 10, angle = 55, hjust = 1.1, vjust = 1),\n^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n```\n[R/plot_merged_assignment.R:80:4:](https://github.com/seninp-bioinfo/MetaComp/blob/782f912cb70b7d79bb69f9065e900fed7c67317d/R/plot_merged_assignment.R#L80) *style:* **Commented code should be removed.**\n```r\n​  #ggdraw(p)\n   ^~~~~~~~~\n```\n[R/plot_merged_assignment.R:81:4:](https://github.com/seninp-bioinfo/MetaComp/blob/782f912cb70b7d79bb69f9065e900fed7c67317d/R/plot_merged_assignment.R#L81) *style:* **Commented code should be removed.**\n```r\n​  #id <- which(p$layout$name == \"guide-box\")\n   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n```\n[R/plot_merged_assignment.R:82:4:](https://github.com/seninp-bioinfo/MetaComp/blob/782f912cb70b7d79bb69f9065e900fed7c67317d/R/plot_merged_assignment.R#L82) *style:* **Commented code should be removed.**\n```r\n​  #p$layout[id, c(\"l\",\"r\")] <- c(1, ncol(p))\n   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n```\n[R/plot_merged_assignment.R:83:4:](https://github.com/seninp-bioinfo/MetaComp/blob/782f912cb70b7d79bb69f9065e900fed7c67317d/R/plot_merged_assignment.R#L83) *style:* **Commented code should be removed.**\n```r\n​  #ggdraw(p)\n   ^~~~~~~~~\n```\n[tests/testthat/test_merge_gottcha_assignments.R:17:27:](https://github.com/seninp-bioinfo/MetaComp/blob/782f912cb70b7d79bb69f9065e900fed7c67317d/tests/testthat/test_merge_gottcha_assignments.R#L17) *style:* **Commas should always have a space after.**\n```r\n​species1 <- species[1:150,]\n                          ^\n```\n[tests/testthat/test_merge_gottcha_assignments.R:18:29:](https://github.com/seninp-bioinfo/MetaComp/blob/782f912cb70b7d79bb69f9065e900fed7c67317d/tests/testthat/test_merge_gottcha_assignments.R#L18) *style:* **Commas should always have a space after.**\n```r\n​species2 <- species[110:214,]\n                            ^\n```\n[tests/testthat/test_merge_gottcha_assignments.R:28:7:](https://github.com/seninp-bioinfo/MetaComp/blob/782f912cb70b7d79bb69f9065e900fed7c67317d/tests/testthat/test_merge_gottcha_assignments.R#L28) *style:* **Use <-, not =, for assignment.**\n```r\n​input = list(\"project1\" = gottcha_assignment1, \"project2\" = gottcha_assignment2)\n      ^\n```\n[tests/testthat/test_plot_merged_assignment.R:19:49:](https://github.com/seninp-bioinfo/MetaComp/blob/782f912cb70b7d79bb69f9065e900fed7c67317d/tests/testthat/test_plot_merged_assignment.R#L19) *warning:* **Do not use absolute paths.**\n```r\n​projects <- data.frame(folder = paste(getwd(), \"/../test_data/\",\n                                                ^~~\n```\n[tests/testthat/test_plot_merged_assignment.R:20:41:](https://github.com/seninp-bioinfo/MetaComp/blob/782f912cb70b7d79bb69f9065e900fed7c67317d/tests/testthat/test_plot_merged_assignment.R#L20) *warning:* **Do not use absolute paths.**\n```r\n​              list_dirs(paste(getwd(), \"/../test_data\", sep = \"\")), sep = \"\"))\n                                        ^~~\n```\n[tests/testthat/test_plot_merged_assignment.R:24:89:](https://github.com/seninp-bioinfo/MetaComp/blob/782f912cb70b7d79bb69f9065e900fed7c67317d/tests/testthat/test_plot_merged_assignment.R#L24) *style:* **Commas should always have a space after.**\n```r\n​projects$accession <- paste(\"Project_\", stringr::str_match(projects$folder, \".*/(.*)\")[,2],\n                                                                                        ^\n```\n[tests/testthat/test_plot_merged_assignment.R:30:6:](https://github.com/seninp-bioinfo/MetaComp/blob/782f912cb70b7d79bb69f9065e900fed7c67317d/tests/testthat/test_plot_merged_assignment.R#L30) *style:* **Commented code should be removed.**\n```r\n​    #print(paste(\"searching \", filename, \" in \", path))\n     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n```\n[tests/testthat/test_plot_merged_assignment.R:51:24:](https://github.com/seninp-bioinfo/MetaComp/blob/782f912cb70b7d79bb69f9065e900fed7c67317d/tests/testthat/test_plot_merged_assignment.R#L51) *style:* **Use <-, not =, for assignment.**\n```r\n​input_assignments_list = plyr::dlply(projects, plyr::.(accession), function(x){\n                       ^\n```\n[tests/testthat/test_plot_merged_assignment.R:52:4:](https://github.com/seninp-bioinfo/MetaComp/blob/782f912cb70b7d79bb69f9065e900fed7c67317d/tests/testthat/test_plot_merged_assignment.R#L52) *style:* **Commented code should be removed.**\n```r\n​  #print(paste(x$assignment))\n   ^~~~~~~~~~~~~~~~~~~~~~~~~~\n```\n[tests/testthat/test_plot_merged_assignment.R:55:4:](https://github.com/seninp-bioinfo/MetaComp/blob/782f912cb70b7d79bb69f9065e900fed7c67317d/tests/testthat/test_plot_merged_assignment.R#L55) *style:* **Commented code should be removed.**\n```r\n​  #res = list(dat)\n   ^~~~~~~~~~~~~~~\n```\n[tests/testthat/test_plot_merged_assignment.R:56:4:](https://github.com/seninp-bioinfo/MetaComp/blob/782f912cb70b7d79bb69f9065e900fed7c67317d/tests/testthat/test_plot_merged_assignment.R#L56) *style:* **Commented code should be removed.**\n```r\n​  #names(res) <- x$accession\n   ^~~~~~~~~~~~~~~~~~~~~~~~~\n```"}}