Various numerical analysis algorithms in R