advanced R programming: learning notes