rEngine.assign("mass", masses);
rEngine.assign("intensity", intensities);
// Construct xcmsRaw object
rEngine.eval("xRaw <- new(\"xcmsRaw\")", false);
rEngine.eval("xRaw@tic <- intensity", false);
rEngine.eval("xRaw@scantime <- scantime * " + SECONDS_PER_MINUTE,
false);
rEngine.eval("xRaw@scanindex <- scanindex", false);
rEngine.eval("xRaw@env$mz <- mass", false);
rEngine.eval("xRaw@env$intensity <- intensity", false);