Skip to content

Commit

Permalink
oops not specific enough
Browse files Browse the repository at this point in the history
  • Loading branch information
gergness committed May 26, 2020
1 parent ce09d90 commit 0675756
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/add-subvariable.R
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ addSubvarsToSelectDerivation <- function(deriv, new_vars) {
isSelectCatDerivation <- function(deriv) {
deriv@expression[["function"]] == "select_categories" &&
deriv@expression[["args"]][[1]][["function"]] == "array" &&
deriv@expression[["args"]][[1]][["args"]][[1]] == "select"
deriv@expression[["args"]][[1]][["args"]][[1]][["function"]] == "select"
}

addSubvarsToSelectCatDerivation <- function(deriv, new_vars, existing_cats) {
Expand Down

1 comment on commit 0675756

@lintr-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

R/add-subvariable.R:160:1: style: Variable and function names should not be longer than 30 characters.

addSubvarsToSelectCatDerivation <- function(deriv, new_vars, existing_cats) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/add-subvariable.R:207:1: style: Lines should not be more than 100 characters.

"cannot add subvariables.\n  ", paste0(var_aliases, "(", cats_for_vars, ")", collapse = ", ")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

tests/testthat/test-add-subvariable.R:71:1: style: Lines should not be more than 100 characters.

​    test_that("Cannot add new categories when adding existing variable to derived select_cat array", {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Please sign in to comment.