wrote FluxCalcs-Rcode.r