-
Notifications
You must be signed in to change notification settings - Fork 27
Description
I have an API that returns an Object[] that contains inside of it double[,]. I can get the outer Object[] but I am not sure how to call the converter to turn the double [,] into the matrix.
clrLoadAssembly("Test.dll")
testClassName <-"Test.Test"
(testObj <- clrNew(testClassName))
clrCall(testObj,"CreateData")
[[1]]
NULL
How do I unpack that data? I tried looking for a way to get a handle to the converter class and call it on the elements. I am new to R and come mainly from a .Net background. The array can have either doubles or strings inside of it.
Test Class:
using System;
namespace Test
{
public class Test
{
public Object[] CreateData()
{
var temp = new Double[2, 3];
temp[0, 0] = 1;
temp[0, 1] = 2;
temp[0, 2] = 3;
temp[1, 0] = 4;
temp[1, 1] = 5;
temp[1, 2] = 6;
var retVal = new object[] { temp };
return retVal;
}
}
}