Enter below an R command that will output the proportion of…