Displaying 6 results from an estimated 6 matches for "getabsolutepath".
2009 Jan 10
0
Rserve/RandomForest does not work with a CSV?
...r Java application is running inside of
Tomcat, and is also running as root.
The actual code looks something like:
RConnection conn = new RConnection("127.0.0.1");
conn.voidEval("library('randomForest')");
conn.voidEval("train<-read.csv(\"" + (outfile.getAbsolutePath()) +
"\",header=FALSE)");
conn.voidEval("x<-train[1:" + totalTrainData + ",1:11]");
conn.voidEval("y<-as.factor(train[1:" + totalTrainData + ",12])");
conn.voidEval("future<-train[" + (totalTrainData + 1) + ":" +
(t...
2008 Mar 27
2
Samba Share Mounts with Java
Hello,
I am developing a Java application that requires me to read from and write to a samba share. When developing in a windows environment this was not a problem. I mounted the share as "M:/", built a path to a file, checked if the file exists using the Java function file.exists(), and went on my merry way. Now I am developing in a Linux environment(SuSE 10). I mount the samba
2010 Mar 24
1
R and/or REngine kills Java
...ut.println("Error when running script - rEngine stopped!");
if (rEngine != null){
rEngine.end();
}
}
// stopping R engine
rEngine.end();
} else {
throw new Exception(getClass().getName() + " not run - missing
R file - location: " + rFile.getAbsolutePath());
}
}
}
+++++++++++++++++++++ END JAVA CODE +++++++++++++++++++++++++
+++++ START R Code ++++++++
library(RJDBC)
# db connection
driver <- JDBC("com.mysql.jdbc.Driver","lib/mysql-connector-java-5.0.6-bin.jar")
con <- dbConnect(driver, "jdbc:mysql://loc...
2010 Sep 15
2
Get File Names in Folder, Read Files, Update, and Write
Dear All,
Could you please recommend how I can do this?
I have several text files in one folder. Let's name them A0801.RSK,
A0802.RSK, ....
I would like R to
1) Know all file names in this folder
2) Update value in one column of these files
3) Write results in another text file with _xval in the file names
Below is R code for read, update, and write one file
2009 Jan 15
2
Interface to open source Reporting tools
...ide of
> Tomcat, and is also running as root.
>
> The actual code looks something like:
>
> RConnection conn = new RConnection("127.0.0.1");
> conn.voidEval("library('randomForest')");
> conn.voidEval("train<-read.csv(\"" + (outfile.getAbsolutePath()) +
> "\",header=FALSE)");
> conn.voidEval("x<-train[1:" + totalTrainData + ",1:11]");
> conn.voidEval("y<-as.factor(train[1:" + totalTrainData + ",12])");
> conn.voidEval("future<-train[" + (totalTrainData + 1)...
2010 Mar 24
0
R-help ordinal regression
...?? ??? }
> ??? ??? ???
> ??? }
>
> ??? ??? ???
> ??? // stopping R engine
> ??? ??? ???
> ??? rEngine.end();
> ??? ??? ? ? } else
> {
> ??? ??? ? ?
> ??? throw new Exception(getClass().getName()
> + " not run - missing
> R file - location: " + rFile.getAbsolutePath());
> ??? ??? ? ? }
> ??? ??? }
> ??? }
>
> +++++++++++++++++++++ END JAVA CODE
> +++++++++++++++++++++++++
>
>
> +++++ START? R Code ++++++++
> library(RJDBC)
>
> # db connection
> driver <-
> JDBC("com.mysql.jdbc.Driver","lib/mysql-c...