rgcca-factory / RGCCA

https://rgcca-factory.github.io/RGCCA/
10 stars 11 forks source link

Check users input #30

Open llrs opened 2 years ago

llrs commented 2 years ago

This PR provides some checks on the users input on the sgcca and sgccak functions. This will help to prevent an obscure error later on. It also introduces a new function correct which checks that the connections use all the blocks and are all connected. The big change on the description is because I used desc::desc_normalize() to sort the fields and limit the length of the lines to 80 characters. I also added Encoding: UTF-8 to be able to use accents and other non ASCII characters on the package.

Not sure which code style do you follow, I used the tidyverse style, let me know if you want to make some modifications.

GFabien commented 2 years ago

Hi @llrs! Thanks for the PR! I won't have time today to look carefully at your PR but here is a quick remark about the choices that were made for the design of the package. The functions sgcca and sgccak are no longer meant to be directly called by the user. We now use the function rgcca which is then responsible to call the appropriate GCCA function (sgcca in your case). Therefore, all the checks are done in this function instead of sgcca. If you look at the ones which are performed, I think all the checks you added are covered except from the one implemented with correct.