Aug 2, 2012 at 6:48 AM
Edited Aug 2, 2012 at 6:51 AM
I've changed some behaviors. Now the following can be used for directly evaluating R code:
R.t_tfidf = R("tapply(dtm$v/row_sums(dtm)[dtm$i], dtm$j, mean) * log2(nDocs(dtm)/col_sums(dtm > 0))")
Additionally "_" to "." conversion has been removed, since it no longer is necessary. Now you can directly call:
print "Memory usage = ", float(R.memory.size())
Here a pseudo object memory is used as a temporary name builder, and the actual call will be done through the concatenated symbol.
Also it is possible request conversion .net objects to R object directly. Both of the following are the same:
R.list = [1, 2, 3]
R.list = R[[1, 2, 3]]
Of course, you can still save the R object in a .net variable:
list = R[[1, 2, 3]]
for item in list:
Here list will be a proxy object to an underlying IntegerVector. The enumeration will automatically return objects of type int.
Currently, not all primitive types are supported. And there still is no support for matrices, expressions, functions, or data frames. And usage in C# may be broken.
I'll keep updating my progress here. If anybody wants to jump in, it would be nice. If you just want to use this in your IronPython project, it would be great as well.