Skip to content
Prev 369889 / 398503 Next

translate formula into R code

This is an excellent exercise for you, the beginner. If you explicitly want a line-by-line translation and don't want to use the strengths of R (vectorization/functions) then there isn't much point in asking us to read the Introduction to R document that comes with the software for you. 

Please read the Posting Guide before posting again... your failure to switch your email client to plain text is going to lead to corruption of your question by the time w we see it eventually. 

PS you did not define what "res" is...