[R] resolve brace_linter warnings (#8564)

This commit is contained in:
James Lamb
2022-12-08 23:01:00 +08:00
committed by GitHub
parent 40a1a2ffa8
commit fbe40d00d8
13 changed files with 31 additions and 20 deletions
@@ -86,7 +86,10 @@ For that purpose, we will:
```{r classToIntegers}
# Convert from classes to numbers
y <- train[, nameLastCol, with = FALSE][[1]] %>% gsub('Class_','',.) %>% {as.integer(.) -1}
y <- train[, nameLastCol, with = FALSE][[1]] %>%
gsub('Class_','',.) %>%
as.integer %>%
subtract(., 1)
# Display the first 5 levels
y[1:5]