Examples of rniAssign()


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

    // Part 2 - low-level API - for illustration purposes only!
    //System.exit(0);
   
        // simple assignment like a<-"hello" (env=0 means use R_GlobalEnv)
        long xp1 = re.rniPutString("hello");
        re.rniAssign("a", xp1, 0);

        // Example: how to create a named list or data.frame
        double da[] = {1.2, 2.3, 4.5};
        double db[] = {1.4, 2.6, 4.2};
        long xp3 = re.rniPutDoubleArray(da);
View Full Code Here

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

       
        long xp6 = re.rniPutString("data.frame");
        re.rniSetAttr(xp5, "class", xp6);
       
        // assign the whole thing to the "b" variable
        re.rniAssign("b", xp5, 0);
       
        {
            System.out.println("Parsing");
            long e=re.rniParse("data(iris)", 1);
            System.out.println("Result = "+e+", running eval");
View Full Code Here

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

    // Part 2 - low-level API - for illustration purposes only!
    //System.exit(0);
   
        // simple assignment like a<-"hello" (env=0 means use R_GlobalEnv)
        long xp1 = re.rniPutString("hello");
        re.rniAssign("a", xp1, 0);

        // Example: how to create a named list or data.frame
        double da[] = {1.2, 2.3, 4.5};
        double db[] = {1.4, 2.6, 4.2};
        long xp3 = re.rniPutDoubleArray(da);
View Full Code Here

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

       
        long xp6 = re.rniPutString("data.frame");
        re.rniSetAttr(xp5, "class", xp6);
       
        // assign the whole thing to the "b" variable
        re.rniAssign("b", xp5, 0);
       
        {
            System.out.println("Parsing");
            long e=re.rniParse("data(iris)", 1);
            System.out.println("Result = "+e+", running eval");
View Full Code Here

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

        rEngine.eval("dataset <- apply(dataset, 2, as.numeric)");

        // Assign row names to the data set
        long rows = rEngine.rniPutStringArray(rowNames);
        rEngine.rniAssign("rowNames", rows, 0);
        rEngine.eval("rownames(dataset)<-rowNames");

        // Assign column names to the data set
        long columns = rEngine.rniPutStringArray(colNames);
        rEngine.rniAssign("colNames", columns, 0);
View Full Code Here

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

        rEngine.rniAssign("rowNames", rows, 0);
        rEngine.eval("rownames(dataset)<-rowNames");

        // Assign column names to the data set
        long columns = rEngine.rniPutStringArray(colNames);
        rEngine.rniAssign("colNames", columns, 0);
        rEngine.eval("colnames(dataset)<-colNames");

        finishedPercentage = 0.5f;

        // Remove the rows with too many NA's. The distances between
View Full Code Here

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

    // Part 2 - low-level API - for illustration purposes only!
    //System.exit(0);
   
        // simple assignment like a<-"hello" (env=0 means use R_GlobalEnv)
        long xp1 = re.rniPutString("hello");
        re.rniAssign("a", xp1, 0);

        // Example: how to create a named list or data.frame
        double da[] = {1.2, 2.3, 4.5};
        double db[] = {1.4, 2.6, 4.2};
        long xp3 = re.rniPutDoubleArray(da);
View Full Code Here

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

       
        long xp6 = re.rniPutString("data.frame");
        re.rniSetAttr(xp5, "class", xp6);
       
        // assign the whole thing to the "b" variable
        re.rniAssign("b", xp5, 0);
       
        {
            System.out.println("Parsing");
            long e=re.rniParse("data(iris)", 1);
            System.out.println("Result = "+e+", running eval");
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.