fadd an option to specify R location in hmr