similar to: Pass Parameters to RScript?

Displaying 20 results from an estimated 10000 matches similar to: "Pass Parameters to RScript?"

2017 Oct 30
3
Pass Parameters to RScript?
Thanks Eric, I saw that page, too, but it states: "This post describes how to pass external arguments to R when calling a Rscript with a command line." Not what I'm trying to do. Thanks for your reply. Sent from [ProtonMail](https://protonmail.com), Swiss-based encrypted email. > -------- Original Message -------- > Subject: Re: [R] Pass Parameters to RScript? > Local
2017 Oct 30
0
Pass Parameters to RScript?
I do not program in Java but it seems a Java program can make system calls which would be equivalent to running from the command line, but done from within a Java program. Not sure whether that would meet your needs and if not why not. Just a suggestion. Check out http://www.java-samples.com/showtutorial.php?tutorialid=8 On Mon, Oct 30, 2017 at 5:10 PM, Morkus <morkus at protonmail.com>
2017 Oct 30
0
Pass Parameters to RScript?
I did a simple search and got hits immediately, e.g. https://www.r-bloggers.com/passing-arguments-to-an-r-script-from-command-lines/ On Mon, Oct 30, 2017 at 2:30 PM, Morkus via R-help <r-help at r-project.org> wrote: > Is it possible to pass parameters to an R Script, say, from Java or other > language? > > I did some searches, but came up blank. > > Thanks very much in
2017 Oct 29
2
Cannot Compute Box's M (Three Days Trying...)
Thanks Duncan. I can't tell you how helpful all your terrific replies have been. I think the biggest surprise is that nobody appears to be using Java and R together like I"m trying to do. I suppose it should be a surprise since there are no books on the subject and almost no technical documentation other than a few sites here and there. ----- I originally had the "int" as the
2017 Oct 28
2
Cannot Compute Box's M (Three Days Trying...)
Hey Duncan, Hard to debug? That's an understatement. Eyes bleeding.... In any case, I tried all your suggestions. To get "integer" for the final column, I had to change the code to get integers instead of strings. double[] d1 = ((REXPVector) ((RList) tableRead).get(0)).asDoubles(); double[] d2 = ((REXPVector) ((RList) tableRead).get(1)).asDoubles(); double[] d3 = ((REXPVector)
2017 Oct 29
1
Cannot Compute Box's M (Three Days Trying...)
Hey Duncan, Since Java is the #1 language and R is extremely popular, I think the most telling thing is that nobody on the "R-devel" forum (where people do "programming with R") is doing R and Java like I'm doing: calling R from Java and passing data structures. So it appears I'm clearly pushing R somewhere it doesn't want to go. And, the boxM issue is more or
2017 Oct 28
2
Cannot Compute Box's M (Three Days Trying...)
Thanks Duncan. Awesome ideas! I think we're getting closer! I tried what you suggested and got a possibly better error... . . . rConnection.assign("boxMVariable", myDf); String resultBV = "str(boxMVariable)"; // your suggestion. RESULTING ERROR: Error in format.default(nam.ob, width = max(ncn), justify = "left") : invalid 'width' argument (No idea
2017 Oct 27
2
How to do a "Box's M" Test with
Trying to get past a frustrating error to do a "simple" Box's M test using Java. The Box's M test says it will work with a data.frame. Here's the setup code: REXP myDf = REXP.createDataFrame(new RList( new REXP[] { new REXPDouble(d1), new REXPDouble(d2), new REXPDouble(d3), new REXPDouble(d4), new REXPInteger(d5) })); Here's the call: REXP boxMResult =
2017 Oct 26
3
How to create a table structure in Java code?
That's amazing! Thank you!!! One follow up question, if that's OK? If, instead of using hard-coded CSV, I read the CSV into a variable first, then it fails again with a parse error. Code below. So, if I read the CSV into a variable, do I need an additional wrapper method? Seems like it should still work. Thanks in advance for your reply. -M String inputIris =
2017 Nov 13
3
Where to get support for Rserve?
Hello, I'm using Rserve with Java and although it works OK for 50 or 60 requests, eventually Rserve simply stops responding and I have to force-quit and restart Rserve. During this time the JVM is fine and Tomcat (app server) is fine, too. The basic Java code does this: -------------------------------------------- 1. Create an R Connection 2. Execute an R Script via Rserve "eval"
2017 Oct 28
2
Cannot Compute Box's M (Three Days Trying...)
I'm not sure what you mean. Could you please be more specific? If I print the string, I get: boxM(boxMVariable[, -5], boxMVariable[, 5]) From this code: . . . // assign the data to a variable.rConnection.assign("boxMVariable", myDf); // create a string command with that variable name.String boxVariable = "boxM(boxMVariable[, -5], boxMVariable[, 5])";
2017 Nov 13
0
Where to get support for Rserve?
?maintainer ## i.e. maintainer("rserve") Also, please search. A web search on simply "rserve" brought up what appeared to be many relevant hits. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Mon, Nov
2017 Oct 24
2
Creating a data table (frame?) from a SQL Statement?
Hello, I'm new to R so this is probably a simple question for somebody. I have an RScript that reads a CSV on the disk using read.table(...). It then does a boxM test using that data. However, I'm now trying to load the same data via an SQL command, but I can't seem to get the data structure defined so R will like it -- using the included "iris" dataset. I've tried
2017 Oct 29
3
Renjin?
Hi All, OK, in the "back to the drawing board" department, I found what looks like a much better solution to using R in Java. Renjin. Looking at the docs and then trying a quick example, didn't quite work. Of course I'm missing something. Although I'm telling the engine to require ("biotools") just like I would in R itself, when I get to the line of code that
2017 Oct 25
2
How to create a table structure in Java code?
Hi all, Using RConsole, it's easy to get data from the database that you can use in an R Command. Like this: (Reference case) irisQuery <- dbGetQuery(conn, "select * from iris") boxM(irisQuery [,-5], irisQuery[,5]) ---- (Actual case this posting is about) Yet, if I'm getting that same (sample IRIS) data, say, in a web service possibly POSTED from a SQL command, that same
2017 Oct 27
4
Cannot Compute Box's M (Three Days Trying...)
It can't be this hard, right? I really need a shove in the right direction here. Been spinning wheels for three days. Cannot get past the errors. I'm doing something wrong, obviously, since I can easily compute the Box's M right there in RStudio But I don't see what is wrong below with the coding equivalent. The entire code snippet is below. The code fails below on the call to
2017 Oct 26
1
How to represent two-dimensonal data in R?
I asked this question yesterday, but since I didn't receive any responses, I thought I would simply the question a bit and try again. Basically, I'm getting a query result sent to a program. That data is just the rows and columns of a database table. Simple 2-D. My (hopefully simple) question is how do I take that variable and put that two-dimensional data in a form I can then send to R?
2017 Oct 21
2
Problem when trying to run Java in R:
Hello All, Although running Java from R used to work, for some mysterious reason, it's stopped. Today when I tried to load a basic JDBC driver (or the sample .jinit()) code, I got: - JavaVM: requested Java version ((null)) not available. Using Java at "" instead. - JavaVM: Failed to load JVM: /bundle/Libraries/libserver.dylib - JavaVM FATAL: Failed to load the jvm library. I
2017 Oct 29
0
Cannot Compute Box's M (Three Days Trying...)
On 29/10/2017 7:26 AM, Morkus wrote: > Thanks Duncan. I can't tell you how helpful all your terrific replies > have been. > > I think the biggest surprise is that nobody appears to be using Java and > R together like I"m trying to do. I suppose it should be a surprise > since there are no books on the subject and almost no technical > documentation other than a
2017 Oct 24
0
Creating a data table (frame?) from a SQL Statement?
Please always cc the list... the group usually has better answers than any one person, and I don't do private consulting on the net. For future reference, there is also an r-sig-db mailing list where this question really belongs. Since I almost never use jdbc, I would need a reprex (hint you are ignoring my advice... a good way to get ignored), which this still isn't. There is probably