Thomas Dappelo – R solution