First you need to find out if there are such implementations in R packages (I believe there are). If there are more than one, you may have to do some simple evaluations before deciding which one to use.
If somehow you cannot find one implementation or the one provided is too slow. You want to think about how to write an efficient code in R.
Again, the report should be <= 2 pages and be in English.