Various statistical procedures in R