R: cosmetics + start translation of (selmix.m into) main.R