Skip to content

Commit

Permalink
Adjust comments
Browse files Browse the repository at this point in the history
  • Loading branch information
kemihak committed Jul 29, 2024
1 parent 7771360 commit 114f005
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions R/createBindingConstraint.R
Original file line number Diff line number Diff line change
Expand Up @@ -790,16 +790,18 @@ createBindingConstraintBulk <- function(constraints,
opts = antaresRead::simOptions()){
assertthat::assert_that(inherits(constraints, "list"))

# check input object
# check matrix number of columns by group
# In all_dim_group, group is column V1, number of columns is column V2
all_dim_group <- do.call("rbind",
c(lapply(constraints, function(x){
data.table(name_group <- x$group,
dim_group <- dim(x$values[[1]])[2])}),
fill=TRUE))
fill = TRUE))

# no check dimension if NULL values
if(dim(all_dim_group)[2]<2)
# If each matrix is NULL, there is no second dimension in the table
if (dim(all_dim_group)[2] < 2) {
return()
}

# no duplicated
all_dim_group <- unique(all_dim_group)
Expand Down

0 comments on commit 114f005

Please sign in to comment.