Hello R Users,

I apologize in advance if this question is in the wrong place, as my
problem is not with the R Core system, but rather with RDCOMClient package.

I am using a third-party modeling software tool that provides access to
some functions via a *.dll file. Using COMCreate("ClassName") I can connect
to the application.

Thus, when I write

obj <- COMCreate("ClassName")

I get an instance of the class. Using functions like

obj$Method()

or

obj$Property()

I can tell that the connection is working as the results that come out are
fine...

However, one of the functions (Its called the Predict function), takes
inputs in the form of one array of bytes. It should return a real number
with the result being a predicted value from the third-party modelling tool.

So in Excel's VBA, you could write something really simple like...

/*Begin VBA Pseudo-code*/

Dim inputs() as Byte
ReDim inputs(1 to 25) as Byte
Dim i as Integer
Dim Output as Double


For i = 1 to 25
    inputs(i) = 1
Next

Output = obj.Predict(inputs)

/*End VBA Pseudo-code*/

However, I can't seem to make this work in R.

I can create an array with this...

inputs <- array(1, dim=c(25))

And then run the same Predict function with this...

Output <- obj$Predict(inputs)

But I get an error. My guess is that "inputs" in R isn't really a an array
of bytes. I'm a little stumped on how to debug this further. Please let me
know if you have any suggestions or a better place to forward this to.

Peter

	[[alternative HTML version deleted]]

