Put this on stack overflow
Will be posting here the answer I'll get 😊
Another option id to hack RR plugin (We did it already to put in R a lang and a gcname variable). The hack could be: look in the R script for a special trigger, then calculate in php the number of facets, and adapt the width setting accordingly with a multiplicator.