Displaying 16 results from an estimated 16 matches for "tableread".
2017 Oct 27
4
Cannot Compute Box's M (Three Days Trying...)
...\n" +
"6.8,3.2,5.9,2.3,virginica\n" +
"6.7,3.3,5.7,2.5,virginica\n" +
"6.7,3,5.2,2.3,virginica\n" +
"6.3,2.5,5,1.9,virginica\n" +
"6.5,3,5.2,2,virginica\n" +
"6.2,3.4,5.4,2.3,virginica\n" +
"5.9,3,5.1,1.8,virginica\n";
List tableRead = rConnection.eval(
"read.csv(textConnection(\"" + inputIris + "\"), header = FALSE)").asList(); // works!
double[] d1 = ((REXPVector) ((RList) tableRead).get(0)).asDoubles();
double[] d2 = ((REXPVector) ((RList) tableRead).get(1)).asDoubles();
double[] d3 = ((REXPVe...
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) ((RList) tableRead).get(2)).asDoubles();
double[] d4 = ((REXPVector) ((RList) tableRead).get(3)).asDoubles();
int[] d5 = ((REXPVector) ((RList) tableRead).get(4)).asIntegers();
//...
2017 Oct 26
1
How to create a table structure in Java code?
...ve tried just including the data in a string.
>>>> - I've tried wrapping the data with "data"
>>>> - I've tried wrapping the data with "data.frame" (as below).
>>>>
>>>> Here's my latest attempt:
>>>> String tableRead = "data.frame(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,setosa\n" +
>>>> "5,3.6,1.4,0.2,setosa)" ;
>>>> // using pa...
2017 Oct 28
2
Cannot Compute Box's M (Three Days Trying...)
..."6.7,3.3,5.7,2.5,virginica\n" +
>> "6.7,3,5.2,2.3,virginica\n" +
>> "6.3,2.5,5,1.9,virginica\n" +
>> "6.5,3,5.2,2,virginica\n" +
>> "6.2,3.4,5.4,2.3,virginica\n" +
>> "5.9,3,5.1,1.8,virginica\n";
>> List tableRead = rConnection.eval(
>> "read.csv(textConnection("" + inputIris + ""), header = FALSE)").asList(); // works!
>> double[] d1 = ((REXPVector) ((RList) tableRead).get(0)).asDoubles();
>> double[] d2 = ((REXPVector) ((RList) tableRead).get(1)).asDoubles();...
2017 Oct 28
2
Cannot Compute Box's M (Three Days Trying...)
...rginica\n" +
>>> "6.7,3,5.2,2.3,virginica\n" +
>>> "6.3,2.5,5,1.9,virginica\n" +
>>> "6.5,3,5.2,2,virginica\n" +
>>> "6.2,3.4,5.4,2.3,virginica\n" +
>>> "5.9,3,5.1,1.8,virginica\n";
>>> List tableRead = rConnection.eval(
>>> "read.csv(textConnection("" + inputIris + ""), header =
>>> FALSE)").asList(); // works!
>>> double[] d1 = ((REXPVector) ((RList) tableRead).get(0)).asDoubles();
>>> double[] d2 = ((REXPVector) ((RList) tableR...
2017 Oct 28
0
Cannot Compute Box's M (Three Days Trying...)
...an
S3-classed integer vector with an attribute listing the levels. Using
strings instead can cause problems in a few R functions (they want
factors, and don't do automatic conversions), but the errors you're
seeing seem more fundamental.
>
> double[] d1 = ((REXPVector) ((RList) tableRead).get(0)).asDoubles();
> double[] d2 = ((REXPVector) ((RList) tableRead).get(1)).asDoubles();
> double[] d3 = ((REXPVector) ((RList) tableRead).get(2)).asDoubles();
> double[] d4 = ((REXPVector) ((RList) tableRead).get(3)).asDoubles();
> *int**[] d5 = ((REXPVector) ((RList) tableRead).ge...
2017 Oct 29
2
Cannot Compute Box's M (Three Days Trying...)
...er vector with an attribute listing the levels. Using
>> strings instead can cause problems in a few R functions (they want
>> factors, and don't do automatic conversions), but the errors you're
>> seeing seem more fundamental.
>> double[] d1 = ((REXPVector) ((RList) tableRead).get(0)).asDoubles();
>> double[] d2 = ((REXPVector) ((RList) tableRead).get(1)).asDoubles();
>> double[] d3 = ((REXPVector) ((RList) tableRead).get(2)).asDoubles();
>> double[] d4 = ((REXPVector) ((RList) tableRead).get(3)).asDoubles();
>> int*[] d5 = ((REXPVector) ((RList)...
2017 Oct 27
0
Cannot Compute Box's M (Three Days Trying...)
...ca\n" +
> "6.7,3.3,5.7,2.5,virginica\n" +
> "6.7,3,5.2,2.3,virginica\n" +
> "6.3,2.5,5,1.9,virginica\n" +
> "6.5,3,5.2,2,virginica\n" +
> "6.2,3.4,5.4,2.3,virginica\n" +
> "5.9,3,5.1,1.8,virginica\n";
>
> List tableRead = rConnection.eval(
> "read.csv(textConnection(\"" + inputIris + "\"), header = FALSE)").asList(); // works!
>
> double[] d1 = ((REXPVector) ((RList) tableRead).get(0)).asDoubles();
> double[] d2 = ((REXPVector) ((RList) tableRead).get(1)).asDoubles();
&g...
2017 Oct 27
0
Cannot Compute Box's M (Three Days Trying...)
...ica\n" +
> "6.7,3.3,5.7,2.5,virginica\n" +
> "6.7,3,5.2,2.3,virginica\n" +
> "6.3,2.5,5,1.9,virginica\n" +
> "6.5,3,5.2,2,virginica\n" +
> "6.2,3.4,5.4,2.3,virginica\n" +
> "5.9,3,5.1,1.8,virginica\n";
>
> List tableRead = rConnection.eval(
> "read.csv(textConnection(\"" + inputIris + "\"), header =
> FALSE)").asList(); // works!
>
> double[] d1 = ((REXPVector) ((RList) tableRead).get(0)).asDoubles();
> double[] d2 = ((REXPVector) ((RList) tableRead).get(1)).asDoubles()...
2017 Oct 29
0
Cannot Compute Box's M (Three Days Trying...)
...n attribute listing the levels. Using
>> strings instead can cause problems in a few R functions (they want
>> factors, and don't do automatic conversions), but the errors you're
>> seeing seem more fundamental.
>> double[] d1 = ((REXPVector) ((RList) tableRead).get(0)).asDoubles();
>> double[] d2 = ((REXPVector) ((RList) tableRead).get(1)).asDoubles();
>> double[] d3 = ((REXPVector) ((RList) tableRead).get(2)).asDoubles();
>> double[] d4 = ((REXPVector) ((RList) tableRead).get(3)).asDoubles();
>> /int/*[] d5 = ((RE...
2017 Oct 28
0
Cannot Compute Box's M (Three Days Trying...)
...rginica\n" +
>> "6.7,3,5.2,2.3,virginica\n" +
>> "6.3,2.5,5,1.9,virginica\n" +
>> "6.5,3,5.2,2,virginica\n" +
>> "6.2,3.4,5.4,2.3,virginica\n" +
>> "5.9,3,5.1,1.8,virginica\n";
>> List tableRead = rConnection.eval(
>> "read.csv(textConnection("" + inputIris + ""), header =
>> FALSE)").asList(); // works!
>> double[] d1 = ((REXPVector) ((RList) tableRead).get(0)).asDoubles();
>> double[] d2 = ((REXPVector) ((RList) tableR...
2017 Oct 25
2
How to create a table structure in Java code?
...t's simple in RConsole, but I can't get R to accept my structure.
- I've tried just including the data in a string.
- I've tried wrapping the data with "data"
- I've tried wrapping the data with "data.frame" (as below).
Here's my latest attempt:
String tableRead = "data.frame(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,setosa\n" +
"5,3.6,1.4,0.2,setosa)" ;
// using parseAndEval below to give me actual error R is sending...
REXP rResponseObject = rCon...
2017 Oct 28
0
Cannot Compute Box's M (Three Days Trying...)
...+ "6.7,3.3,5.7,2.5,virginica\n" + "6.7,3,5.2,2.3,virginica\n"
>> + "6.3,2.5,5,1.9,virginica\n" + "6.5,3,5.2,2,virginica\n" +
>> "6.2,3.4,5.4,2.3,virginica\n" + "5.9,3,5.1,1.8,virginica\n";
>> List tableRead = rConnection.eval( "read.csv(textConnection(""
>> + inputIris + ""), header = FALSE)").asList(); // works!
>> double[] d1 = ((REXPVector) ((RList)
>> tableRead).get(0)).asDoubles(); double[] d2 = ((REXPVector)
>>...
2017 Oct 26
3
How to create a table structure in Java code?
...my structure.
>>
>> - I've tried just including the data in a string.
>> - I've tried wrapping the data with "data"
>> - I've tried wrapping the data with "data.frame" (as below).
>>
>> Here's my latest attempt:
>> String tableRead = "data.frame(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,setosa\n" +
>> "5,3.6,1.4,0.2,setosa)" ;
>> // using parseAndEval below to give me actual error...
2017 Oct 26
0
How to create a table structure in Java code?
...9;t get R to accept my structure.
>
> - I've tried just including the data in a string.
> - I've tried wrapping the data with "data"
> - I've tried wrapping the data with "data.frame" (as below).
>
> Here's my latest attempt:
>
> String tableRead = "data.frame(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,setosa\n" +
> "5,3.6,1.4,0.2,setosa)" ;
>
> // using parseAndEval below to give me actual error R is sending....
2017 Oct 26
0
How to create a table structure in Java code?
...t;>> - I've tried just including the data in a string.
>>> - I've tried wrapping the data with "data"
>>> - I've tried wrapping the data with "data.frame" (as below).
>>>
>>> Here's my latest attempt:
>>> String tableRead = "data.frame(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,setosa\n" +
>>> "5,3.6,1.4,0.2,setosa)" ;
>>> // using parseAndEval below to...