Epi  functions in R