R Programming Solution for Effect of a Particular Environmental Regulation Plan