Separated functions into R_meth_functions. Still need to work on permutation analsysis