Optimal Experimental Design with R