Check if there is any R implementation of the covering
algorithm.
If so, please trace the code and study how it works.
If there is no such implementations,
check weka's implementation and let us know what you find.
In this situation, we may consider writing an R implementation
in a future homework.