Solanum - code in R