i am using R.Net. in that i have done some database connection using R.Net in that i am getting the result in DataFrame format i need to convert it into DataSet
here is my code:
REngine.SetDllDirectory("@C:\Program Files\R\R-2.12.0\bin\i386")
engine = REngine.CreateInstance("RDotNet")
engine.EagerEvaluate("library(RODBC);")
engine.EagerEvaluate("con <- odbcConnect(dsn='rdsn', uid = 'sa', pwd = 'surya');")
cmdStr = SELECT DISTINCT Investment.InvestmentTypeCode,InvestmentTypeDescription, SortID FROM Investment,InvestmentTypeDef WHERE(Investment.InvestmentTypeCode = InvestmentTypeDef.InvestmentTypeCode) ORDER BY SortID
engine.EagerEvaluate("frm <- sqlQuery(con, '" + cmdStr + "');")
engine.GetSymbol("frm").AsDataFrame()
if any one knows plz help me…
There is not built-in functionality in R.Net or in the .NET Framework which can do that. But you can create and fill DataSets programmatically. So you will have to write your own conversion code.
See:
Creating A DataSet Programmatically