unpack R into BUILD_DIR