In the lmpLoadings2dPlots function of limpca, if there are fewer than 10 responses in our outcomes, an error message is displayed because the pl_n parameter is set to 10 by default. Therefore, the code creates a vector of 10 labels even though we have fewer than 10 responses.
Possible solution: Add a condition that allows modifying the pl_n to the number of responses if the response count is less than pl_n.
In the lmpLoadings2dPlots function of limpca, if there are fewer than 10 responses in our outcomes, an error message is displayed because the pl_n parameter is set to 10 by default. Therefore, the code creates a vector of 10 labels even though we have fewer than 10 responses.
Possible solution: Add a condition that allows modifying the pl_n to the number of responses if the response count is less than pl_n.
if(length(labs) < pl_n){ pl_n <- length(labs) }