R programming 2WP