Package org.rosuda.JRI

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


        // Remove the rows with too many NA's. The distances between
        // rows can't be calculated if the rows don't have
        // at least one sample in common.
        rEngine.eval(" d <- as.matrix(dist(dataset))");
        rEngine.eval("d[upper.tri(d)] <- 0");
        rEngine.eval("dataset <- dataset[-na.action(na.omit(d)),]");

        finishedPercentage = 0.8f;

        String marginParameter = "margins = c(" + columnMargin + ","
            + rowMargin + ")";
View Full Code Here


        finishedPercentage = 0.8f;

        String marginParameter = "margins = c(" + columnMargin + ","
            + rowMargin + ")";
        rEngine.eval(
            "br<-c(seq(from=min(dataset,na.rm=T),to=0,length.out=256),seq(from=0,to=max(dataset,na.rm=T),length.out=256))",
            false);

        // Possible output file types
        if (outputType.contains("pdf")) {
View Full Code Here

            false);

        // Possible output file types
        if (outputType.contains("pdf")) {

          rEngine.eval("pdf(\"" + outputFile + "\", height=" + height
              + ", width=" + width + ")");
        } else if (outputType.contains("fig")) {

          rEngine.eval("xfig(\"" + outputFile + "\", height="
              + height + ", width=" + width
View Full Code Here

          rEngine.eval("pdf(\"" + outputFile + "\", height=" + height
              + ", width=" + width + ")");
        } else if (outputType.contains("fig")) {

          rEngine.eval("xfig(\"" + outputFile + "\", height="
              + height + ", width=" + width
              + ", horizontal = FALSE, pointsize = 12)");
        } else if (outputType.contains("svg")) {

          // Load RSvgDevice library
View Full Code Here

              + height + ", width=" + width
              + ", horizontal = FALSE, pointsize = 12)");
        } else if (outputType.contains("svg")) {

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

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

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

          rEngine.eval("devSVG(\"" + outputFile + "\", height="
              + height + ", width=" + width + ")");
        } else if (outputType.contains("png")) {

          rEngine.eval("png(\"" + outputFile + "\", height=" + height
              + ", width=" + width + ")");
View Full Code Here

          rEngine.eval("devSVG(\"" + outputFile + "\", height="
              + height + ", width=" + width + ")");
        } else if (outputType.contains("png")) {

          rEngine.eval("png(\"" + outputFile + "\", height=" + height
              + ", width=" + width + ")");
        }

        if (plegend) {
View Full Code Here

              + ", width=" + width + ")");
        }

        if (plegend) {

          rEngine.eval(
              "heatmap.2(dataset,"
                  + marginParameter
                  + ", trace=\"none\", col=bluered(length(br)-1), breaks=br, cellnote=stars, notecol=\"black\", notecex="
                  + starSize + ", na.color=\"grey\")", false);
        } else {
View Full Code Here

                  + marginParameter
                  + ", trace=\"none\", col=bluered(length(br)-1), breaks=br, cellnote=stars, notecol=\"black\", notecex="
                  + starSize + ", na.color=\"grey\")", false);
        } else {

          rEngine.eval(
              "heatmap.2(dataset,"
                  + marginParameter
                  + ", trace=\"none\", col=bluered(length(br)-1), breaks=br, na.color=\"grey\")",
              false);
        }
View Full Code Here

                  + marginParameter
                  + ", trace=\"none\", col=bluered(length(br)-1), breaks=br, na.color=\"grey\")",
              false);
        }

        rEngine.eval("dev.off()", false);
        finishedPercentage = 1.0f;

      } catch (Throwable t) {

        throw new IllegalStateException(
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.