search for: boxm

Displaying 20 results from an estimated 24 matches for "boxm".

Did you mean: box
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 these ways of loading the SQL statement into a compatible R Structure...
2017 Oct 26
1
How to create a table structure in Java code?
Thanks! I just figured it out (thanks to "Beyond Compare") and was coming here to post back. The boxM test doesn't work with that (now, finally working) REXP structure, but I probably now need to create a table or something and parse that structure. So much fun! :) Thanks again. - M Sent from [ProtonMail](https://protonmail.com), Swiss-based encrypted email. > -------- Original Message...
2017 Oct 27
4
Cannot Compute Box's M (Three Days Trying...)
...ls 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 the boxM statistic call. PLEASE HELP!!! Thanks in advance, ------------------------- rConnection.eval("library('biotools')"); String inputIris = "5.1,3.5,1.4,0.2,setosa\n" + "4.9,3,1.4,0.2,setosa\n" + "4.7,3.2,1.3,0.2,setosa\n" + "4.6,3.1,1.5,0.2,set...
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])"; System.out.println(bo...
2017 Oct 24
0
Creating a data table (frame?) from a SQL Statement?
...lect count(*) from iris") // >works! >irisQuery <- read.table(dbGetQuery(conn, "select * from iris")) works! >irisQuery > // displays table from iris dataset I imported into MySQL >boxM(irisQuery[,-5], irisQuery[,5]) > / />>> FAILS! <<< "Error: is.numeric(x) || is.logical(x) is not TRUE" >dbDisconnect(conn) > // displays TRUE. > >---- >...
2017 Oct 29
3
Renjin?
...enjin. 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 does the actual call engine.eval("boxMResult <- boxM(inputIris [,-5], inputIris[,5])"); Then, I get: Exception in thread "main" org.renjin.eval.EvalException: could not find function 'boxM' Am I using Renjin as intended? Biotools is installed in R and works fine from RStudio. I didn't see any examples i...
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 what this means). For testing, I'm using the same standar...
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 data might look like this (portion of the included iris data set below). I'm thus not sure how to...
2017 Oct 26
3
How to create a table structure in Java code?
...> > On 25-10-17 12:50, Morkus via R-devel wrote: > >> 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 data migh...
2017 Oct 27
0
Cannot Compute Box's M (Three Days Trying...)
Does it work if you supply the closing parenthesis on the call to boxM? The parser says the input is incomplete and a missing closing parenthesis would cause that error.. // create a string command with that variable name.String boxVariable = "boxM(boxMVariable [,-5], boxMVariable[,5]"; // try to execute the command... // FAILS with org.rosuda.REngine.Rser...
2017 Oct 28
2
Cannot Compute Box's M (Three Days Trying...)
...XPVector) ((RList) tableRead).get(4)).asIntegers(); // create data frame with data.REXP myDf = REXP.createDataFrame(new RList( new REXP[] { new REXPDouble(d1), new REXPDouble(d2), new REXPDouble(d3), new REXPDouble(d4), new REXPInteger(d5) })); Here are the results from the eval debug code. head(boxMVariable) ? Gives the high level 5 objects. typeof(boxMVariable): ?list? class(boxMVariable) : ?data.frame? names(boxMVariable) ? String object returned (couldn't evaluate it) ncol(boxMVariable) - 5 nrow(boxMVariable) - 150 typeof(boxMVariable) for (i in 1:5) print(typeof(boxMVariabl...
2017 Oct 29
1
Cannot Compute Box's M (Three Days Trying...)
...ink 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 less debug-proof at this moment. Perhaps I'll need to off-shore this issue for resolution for a few hundred bucks? I'm at the point now where I probably need to just pay somebody to get this crazy BoxM thing working! :( Thanks again, Sent from [ProtonMail](https://proton...
2017 Oct 28
0
Cannot Compute Box's M (Three Days Trying...)
On 28/10/2017 7:12 AM, Morkus wrote: > 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 what thi...
2017 Oct 28
0
Cannot Compute Box's M (Three Days Trying...)
On 28/10/2017 6:26 AM, Morkus wrote: > I'm not sure what you mean. Could you please be more specific? You were trying to eval an expression that you constructed in Java. I was suggesting that before you eval it, you print it. > > If I print the string, I get: *boxM(boxMVariable[, -5], boxMVariable[, 5])* Right, that's what I was suggesting you do. Now you've fixed the syntax error, that looks okay. If I'm reading these messages in the right order, your latest error is Error in `[.data.frame`(boxMVariable, , -5) : undefined columns selected...
2017 Oct 29
2
Cannot Compute Box's M (Three Days Trying...)
...yDf = REXP.createDataFrame(new RList( >> new REXP[] >> { >> new REXPDouble(d1), >> new REXPDouble(d2), >> new REXPDouble(d3), >> new REXPDouble(d4), >> *new *REXPInteger(d5) >> })); >> Here are the results from the eval debug code. >> head(boxMVariable) ? Gives the high level 5 objects. >> typeof(boxMVariable): ?list? >> class(boxMVariable) : ?data.frame? >> names(boxMVariable) ? String object returned (couldn't evaluate it) >> >> That sounds like it could be serious. Dataframe names shouldn't be &g...
2017 Oct 27
2
How to do a "Box's M" Test with
...;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 = rConnection.eval( "boxM(" + myDf+ "[,-5], " + myDf + " [, 5])"); But, I keep getting syntax errors. If this code isn't right, how do you build a data.frame R will like? No examples I can find, anywhere. Not sure what to try next. I've tried just sen...
2017 Oct 28
0
Cannot Compute Box's M (Three Days Trying...)
...me with data. > /REXP myDf = REXP.createDataFrame(new RList( > new REXP[] > { > new REXPDouble(d1), > new REXPDouble(d2), > new REXPDouble(d3), > new REXPDouble(d4), > *new **REXPInteger(d5)* > })); > > Here are the results from the eval debug code. > > head(boxMVariable)? ? Gives the high level 5 objects. > > typeof(boxMVariable): ?list? > > class(boxMVariable) : ?data.frame? > > names(boxMVariable)? ? String object returned (couldn't evaluate it) That sounds like it could be serious. Dataframe names shouldn't be particularl...
2017 Oct 29
0
Renjin?
...gt; > 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 does the > > actual call > > > > engine.eval("boxMResult <- boxM(inputIris [,-5], inputIris[,5])"); > > Then, I get: > > Exception in thread "main" org.renjin.eval.EvalException: could not > > find function 'boxM' > > > > Am I using Renjin as intended? Biotools is installed in R and works &gt...
2017 Oct 26
0
How to create a table structure in Java code?
...SE) HTH, Jan On 25-10-17 12:50, Morkus via R-devel wrote: > 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 data might look like this (portion of the included iris data set below)...
2017 Oct 29
0
Cannot Compute Box's M (Three Days Trying...)
...> new REXP[] >> { >> new REXPDouble(d1), >> new REXPDouble(d2), >> new REXPDouble(d3), >> new REXPDouble(d4), >> *new */REXPInteger(d5)/ >> })); >> Here are the results from the eval debug code. >> head(boxMVariable)? ? Gives the high level 5 objects. >> typeof(boxMVariable): ?list? >> class(boxMVariable) : ?data.frame? >> names(boxMVariable)? ? String object returned (couldn't evaluate it) >> >> That sounds like it could be serious. Dataframe names sho...