If you read the documentation (accessible via ?network), you will see the following description of the comp parameter:
atomic or vector of positive integers. The components to adequately account for the data association. Defaults to comp = 1.
Hence, by default, this function will only use the first component. I am curious as to what is making you believe that it is including the second component with the function call you included in your post. If you could provide the plot and the portion of the script used to yield said plot, I can confirm if this is an error of the package or not.
Just in case, here is how you would do it for your call of the network() function. If I had set up my data as follows:
data("breast.TCGA")
X <- list(mirna = breast.TCGA$data.train$mirna,
mrna = breast.TCGA$data.train$mrna,
protein = breast.TCGA$data.train$protein)
Y <- breast.TCGA$data.train$subtype
sgccda.res <- block.splsda(X, Y, ncomp = 3)
Within the network() function I would include the follow parameter specification (I am replicating the fact that you’ve done block = c(1,2)):
comp = list(mirna=1,mrna=1)
If I wanted both the first and second component, I would do the following:
Max,
I can see the variables from the second component in the network visualization whenuse the code below:
The code I used to produce the block is
network(sgccda.res, blocks = c(1,2),
color.node = c(‘lightgreen’,‘cyan’), cutoff = 0.3, symkey=TRUE, cex.node.name=.5, color.edge = c(“blue”, “red”),lwd.edge = 2 )
Based on your suggestion I will try the comp= in place of block =.
Thank you,
Jen