added EMOSA R file