ManonMartin / limpca

https://manonmartin.github.io/limpca/
1 stars 2 forks source link

Error in the mpLoadings2dPlots function #20

Open AntoineVisschers opened 10 months ago

AntoineVisschers commented 10 months ago

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) }