Package org.rosuda.JRI

Examples of org.rosuda.JRI.Rengine.eval()


        Rengine re = getRengine();

        if (re == null) {
            Helper.ok("aaaah");
        }
        re.eval(command);
    }

    /*
     //rdao.getRengine()
     String evalstr = "[" +  + "]";
View Full Code Here


    final double[] baseline;
    synchronized (RUtilities.R_SEMAPHORE) {

      // Load PTW library.
      if (rEngine.eval("require(ptw)").asBool().isFALSE()) {

        throw new IllegalStateException(
            "The \"ptw\" R package couldn't be loaded - is it installed in R?");
      }
View Full Code Here

        // Set chromatogram.
        rEngine.assign("chromatogram", chromatogram);

        // Calculate baseline.
        baseline = rEngine.eval(
            "asysm(chromatogram," + smoothing + ',' + asymmetry
                + ')').asDoubleArray();

      } catch (Throwable t) {
View Full Code Here

    }

    synchronized (RUtilities.R_SEMAPHORE) {

      // Is R installed - load CAMERA library.
      if (rEngine.eval("require(CAMERA)").asBool().isFALSE()) {

        throw new IllegalStateException(
            "The CAMERA R package couldn't be loaded - is it installed in R?");
      }
View Full Code Here

        throw new IllegalStateException(
            "The CAMERA R package couldn't be loaded - is it installed in R?");
      }

      // Check version of CAMERA.
      if (rEngine
          .eval("packageVersion('CAMERA') >= '" + CAMERA_VERSION
              + '\'').asBool().isFALSE()) {

        throw new IllegalStateException(
            "An old version of the CAMERA package is installed in R - please update CAMERA to version "
View Full Code Here

            "An old version of the CAMERA package is installed in R - please update CAMERA to version "
                + CAMERA_VERSION + " or later");
      }

      // Create empty peaks matrix.
      rEngine.eval(
          "columnHeadings <- c('mz','mzmin','mzmax','rt','rtmin','rtmax','into','intb','maxo','sn')",
          false);
      rEngine.eval(
          "peaks <- matrix(nrow=0, ncol=length(columnHeadings))",
          false);
View Full Code Here

      // Create empty peaks matrix.
      rEngine.eval(
          "columnHeadings <- c('mz','mzmin','mzmax','rt','rtmin','rtmax','into','intb','maxo','sn')",
          false);
      rEngine.eval(
          "peaks <- matrix(nrow=0, ncol=length(columnHeadings))",
          false);
      rEngine.eval("colnames(peaks) <- columnHeadings", false);

      // Initialize.
View Full Code Here

          "columnHeadings <- c('mz','mzmin','mzmax','rt','rtmin','rtmax','into','intb','maxo','sn')",
          false);
      rEngine.eval(
          "peaks <- matrix(nrow=0, ncol=length(columnHeadings))",
          false);
      rEngine.eval("colnames(peaks) <- columnHeadings", false);

      // Initialize.
      final ChromatographicPeak[] peaks = peakList.getPeaks(rawFile);
      progress = 0.0;
View Full Code Here

            .getRawDataPointsRTRange() : rtRange).getMin();
        final double rtMax = (rtRange == null ? peak
            .getRawDataPointsRTRange() : rtRange).getMax();

        // Add peak row.
        rEngine.eval("peaks <- rbind(peaks, c(" + mz + ", " // mz
            + mz + ", " // mzmin: use the same as mz.
            + mz + ", " // mzmax: use the same as mz.
            + peak.getRT() + ", " // rt
            + rtMin + ", " // rtmin
            + rtMax + ", " // rtmax
View Full Code Here

      rEngine.assign("scanindex", scanIndices);
      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);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.