Removed unnecessary concantenations
This commit is contained in:
parent
8b0d1c3cc3
commit
c5cf0edd1d
5 changed files with 8 additions and 7 deletions
3
.github/workflows/r.yml
vendored
3
.github/workflows/r.yml
vendored
|
|
@ -110,7 +110,8 @@ jobs:
|
|||
pipe_continuation_linter, semicolon_terminator_linter,
|
||||
single_quotes_linter, spaces_inside_linter,
|
||||
trailing_blank_lines_linter, trailing_whitespace_linter,
|
||||
undesirable_function_linter, undesirable_operator_linter
|
||||
undesirable_function_linter, undesirable_operator_linter,
|
||||
unneeded_concatenation_linter
|
||||
) # TODO: expand style rules as package matures
|
||||
lint_package(linters = style_rules)
|
||||
shell: Rscript {0}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
COUNTS <- array(0, dim = c(100, 100, 100))
|
||||
SUMCOUNTS <- array(0, dim = c(100, 100))
|
||||
PARTITION <- array(1, dim = c(100))
|
||||
POP_LOGML <- array(1, dim = c(100))
|
||||
PARTITION <- array(1, dim = 100)
|
||||
POP_LOGML <- array(1, dim = 100)
|
||||
LOGDIFF <- array(1, dim = c(100, 100))
|
||||
# If handling globas break, try other ideas from https://stackoverflow.com/a/65252740/1169233
|
||||
|
||||
|
|
|
|||
|
|
@ -516,7 +516,7 @@ indMix <- function(c, npops, dispText = TRUE) {
|
|||
|
||||
if (ready == 0) {
|
||||
if (vaihe == 1) {
|
||||
roundTypes <- c(1)
|
||||
roundTypes <- 1
|
||||
} else if (vaihe == 2) {
|
||||
roundTypes <- c(2, 1)
|
||||
} else if (vaihe == 3) {
|
||||
|
|
|
|||
|
|
@ -185,7 +185,7 @@ writeMixtureInfo <- function(logml, rowsFromInd, data, adjprior, priorTerm, outP
|
|||
if (fid != -1) {
|
||||
append(fid, " ")
|
||||
append(fid, " ")
|
||||
append(fid, c("KL-divergence matrix in PHYLIP format:"))
|
||||
append(fid, "KL-divergence matrix in PHYLIP format:")
|
||||
append(fid, "\n")
|
||||
}
|
||||
|
||||
|
|
@ -290,7 +290,7 @@ writeMixtureInfo <- function(logml, rowsFromInd, data, adjprior, priorTerm, outP
|
|||
append(fid, "\n")
|
||||
append(fid, " ")
|
||||
append(fid, "\n")
|
||||
append(fid, c("Probabilities for number of clusters"))
|
||||
append(fid, "Probabilities for number of clusters")
|
||||
append(fid, "\n")
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -139,7 +139,7 @@ test_that("isempty works as expected", {
|
|||
B <- matrix(rep(NA, 4), 2)
|
||||
C <- matrix(rep(0, 4), 2)
|
||||
cat1 <- as.factor(c(NA, NA))
|
||||
cat2 <- as.factor(c())
|
||||
cat2 <- factor()
|
||||
str1 <- matrix(rep("", 3))
|
||||
expect_true(isempty(A))
|
||||
expect_false(isempty(B))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue