Pātuhitia tēnei: Modern statistical methods for Astronomy with R applications