How to create a dataframe

May 4 at 3:04 PM

Using RDotNet I am trying to call a R function which will get a dataframe. This is the first time I am working with RDotnet. For testing purpose I created the following script:

returnList = f<-function( thisData )
outList = list()
outList$xmsg = thisData$AGE_YEAR
outList$theWholeList = outList

From my application I am calling this function like this
var x = engine.Evaluate("thisData <- data.frame("ADV_DIR_CATEGORY"="a", "AGE_YEAR"="93")");
var y = engine.Evaluate("f(thisData)").AsCharacterMatrix();

But the output which I am getting is list(xmsg = 1) and not list(xmsg = 93)

I am assuming there is something wrong with the dataframe. so my question is how can I create a dataframe from a datatable, whose column names would be the variable name of dataframe, like ADV_DIR_CATEGORY and AGE_YEAR in above case? I am using RDotNet This is kind of urgent.

Thanks in advance for help