Skip to content

Commit

Permalink
correct bug
Browse files Browse the repository at this point in the history
  • Loading branch information
MAHOUDI Abdallah (Externe) committed Mar 28, 2024
1 parent a83f35a commit bc6a38b
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions R/readClusterDesc.R
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,7 @@ readClusterSTDesc <- function(opts = simOptions()) {
warning("No cluster description available.", call. = FALSE)
res <- setNames(data.table(matrix(nrow = 0, ncol = 2 + length(columns))), c("area", "cluster", columns))

Check warning on line 130 in R/readClusterDesc.R

View check run for this annotation

Codecov / codecov/patch

R/readClusterDesc.R#L130

Added line #L130 was not covered by tests
}else{

clusters <- rbindlist(list_clusters, idcol = "cluster")
newcol <- data.table()
newcol <- newcol[, c("area", "cluster") := tstrsplit(clusters$cluster, " / ", fixed = TRUE, keep = 1:2)]
res <- data.table(newcol,clusters[,-"cluster"])
res <- res[, .SD, .SDcols = c("area", "name", "group", names(res)[!names(res) %in%c("area", "name", "group")])]

Check warning on line 132 in R/readClusterDesc.R

View check run for this annotation

Codecov / codecov/patch

R/readClusterDesc.R#L132

Added line #L132 was not covered by tests
}


Expand Down

0 comments on commit bc6a38b

Please sign in to comment.