It is easier and less effort to access the ADCxCON and ADCxMDE MMRs directly for modifications.
This is faster and less overhead than using the library functions.
I.e.
ADCxMDE = (GAIN << 4)| // 1 to 7 for PGA Gain = 2^GAIN = 1 to 127
(MOD2 << 3)| // 0 = extra gain is 1 / 1 = extra gain = 2
(MODE << 0); // 0 = power-down / 1 = Continuous / 2 = Single / 3 = idle ...
That's how I prefer it.