Analysis of experimental data in R