Number of components for network()

Hi mixOmics team,

thank you for your work! My question is about the comp parameter within the network() function and related to this earlier post.

I performed a block.splsda() for my data with 4 blocks. The optimal number of components, as determined by the perf() function, was 3.

When using this object for the network() functions, I observed some inconsistencies with the documentation when changing the comp parameter. In the documentation and in this post it says, that by default only the first component is used. However, by using the following code, it seems to me that by default, all components are used.

I created three network() objects using all blocks but different inputs for the comp parameter: one with the default for comp (x1), one with all components for all blocks (x2), and one with the first component of each block (x3). By comparing the objects, it appears that x2, but not x3 is identical to the object with the default for comp.

# network with all blocks and default components
x1 <- network(final_model, blocks = seq(1, length(final_model$names$blocks)-1))

# create a list with a sequence of all components for all blocks
comps <- names(final_model$ncomp)[1:(length(final_model$ncomp)-1)]
list_comps <- list()
for (i in 1:length(comps)) {
  list_comps[[i]] <- seq(1, final_model$ncomp[1])
  names(list_comps)[i] <- comps[i]
}

# create a network with all blocks and all components
x2 <- network(final_model, blocks = seq(1, length(final_model$names$blocks)-1), comp = list_comps)

# create a list with only the first component for each block
comps <- names(final_model$ncomp)[1:(length(final_model$ncomp)-1)]
list_comps <- list()
for (i in 1:length(comps)) {
  list_comps[[i]] <- 1
  names(list_comps)[i] <- comps[i]
}

# create a network with all blocks and the first component
x3 <- network(final_model, blocks = seq(1, length(final_model$names$blocks)-1), comp = list_comps)

# remove the graph from the output objects
x1$gR <- NA
x2$gR <- NA
x3$gR <- NA

identical(x1, x2) # TRUE
identical(x1, x3) # FALSE

Am I missing something or may the network() function behave different from the documentation.

Thank you for your help!

Best