edit and use R to analyse the data