factor Summary Factor R In order to use more than one factor variable in tapply one can use the method Josh has shown. They…