Just another small exercise on R coding... A small multiple nested for loop with final if to filter the MREs