My newbie question here is I have a matrix M1 and I want to do multiplication with another matrix for each row of the matrix, with the help of R's apply function. So in R it's like:
let M1 = R.matrix([1..12], ncol = 3)
let M2 = R.matrix([1; 2; 3], ncol = 1)
let f = R.eval(R.parse(text = "function (M1, M2) {M1 %*% M2}"))
R.apply(namedParams ["X", box M1; "MARGIN", box 1; "FUN", box f], M2)
Then I got the error:
System.Exception: No converter registered for type Microsoft.FSharp.Core.ExtraTopLevelOperators+dictRefType@101-1[[System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]] or any of its base types
So how can I do this in F# with RProvider? Thanks.
My newbie question here is I have a matrix M1 and I want to do multiplication with another matrix for each row of the matrix, with the help of R's
apply
function. So in R it's like:My F# code with RProvide it's like
Then I got the error:
System.Exception: No converter registered for type Microsoft.FSharp.Core.ExtraTopLevelOperators+dictRefType@101-1[[System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]] or any of its base types
So how can I do this in F# with RProvider? Thanks.