Shape memory behaviour associated with the R and martensitic transformations in a NiTi alloy