I've confirmed it works with 3.2.3
↧
New Post: RdotNet and R version 3.2.4
↧
New Post: RdotNet and R version 3.2.4
Thank you very much
↧
↧
Reviewed: R.NET 1.5.19 (NuGet) (3月 23, 2016)
Rated 5 Stars (out of 5) - good ,good,good
↧
New Post: Does it exist error or bug in "REngine.GetInstance()"?
Hi, I really would love to use it in my C# programs via RDotNet.
I've added R.net via Manage NuGet Packages in VS2013 (RDotNet runtime Version v4.0.30319).
Within Windows 7 I'm running R-3.1.0 a within my C:\Program Files\R\R-3.1.0\bin folder.
Here's code as below:
Test 1 if statement is correct (return false). Test 2 statement return wrong result (return true).
What's happened in 'REngine regine = REngine.GetInstance()' ?
After run 'REngine.GetInstance()' The Test 2 if statement got wrong result.
I have no idea about this. Is this bug in RDotNet?
Thanks for your help.
I've added R.net via Manage NuGet Packages in VS2013 (RDotNet runtime Version v4.0.30319).
Within Windows 7 I'm running R-3.1.0 a within my C:\Program Files\R\R-3.1.0\bin folder.
Here's code as below:
public double StandardDeviation(double[] examples)
{
double STD = Double.NaN;
//====Test 1. Start======
int Oos1 = 2;
int SiteCount1 = 5;
string KeyItem1 = "60";
string waferPass1;
if ((Convert.ToDouble(Oos1) / Convert.ToDouble(SiteCount1)) >
((Convert.ToDouble(100) - Convert.ToDouble(KeyItem1))
/ Convert.ToDouble(100)))
//return false
{
waferPass1 = "N";
}
else
{
waferPass1 = "Y";
}
//====Test 1. End======
// Initial/Using R.Net Component
REngine regine = REngine.GetInstance();
//====Test 2. Start======
int Oos2 = 2;
int SiteCount2 = 5;
string KeyItem2 = "60";
string waferPass2;
if ((Convert.ToDouble(Oos2) / Convert.ToDouble(SiteCount2)) >
((Convert.ToDouble(100) - Convert.ToDouble(KeyItem2))
/ Convert.ToDouble(100)))
//return true
{
waferPass2 = "N";
}
else
{
waferPass2 = "Y";
}
//====Test 2. End======
......................
}
The REngine.GetInstance() Made the same if-else statement (Test 1 & Test 2) get different result.Test 1 if statement is correct (return false). Test 2 statement return wrong result (return true).
What's happened in 'REngine regine = REngine.GetInstance()' ?
After run 'REngine.GetInstance()' The Test 2 if statement got wrong result.
I have no idea about this. Is this bug in RDotNet?
Thanks for your help.
↧
Created Unassigned: Does it exist error or bug in "REngine.GetInstance()"? [187]
Hi, I really would love to use it in my C# programs via RDotNet.
I've added R.net via Manage NuGet Packages in VS2013 (RDotNet runtime Version v4.0.30319).
Within Windows 7 I'm running R-3.1.0 a within my C:\Program Files\R\R-3.1.0\bin folder.
Here's code as below:
```
public double StandardDeviation(double[] examples)
{
double STD = Double.NaN;
//====Test 1. Start======
int Oos1 = 2;
int SiteCount1 = 5;
string KeyItem1 = "60";
string waferPass1;
if ((Convert.ToDouble(Oos1) / Convert.ToDouble(SiteCount1)) >
((Convert.ToDouble(100) - Convert.ToDouble(KeyItem1))
/ Convert.ToDouble(100)))
//return false
{
waferPass1 = "N";
}
else
{
waferPass1 = "Y";
}
//====Test 1. End======
// Initial/Using R.Net Component
REngine regine = REngine.GetInstance();
//====Test 2. Start======
int Oos2 = 2;
int SiteCount2 = 5;
string KeyItem2 = "60";
string waferPass2;
if ((Convert.ToDouble(Oos2) / Convert.ToDouble(SiteCount2)) >
((Convert.ToDouble(100) - Convert.ToDouble(KeyItem2))
/ Convert.ToDouble(100)))
//return true
{
waferPass2 = "N";
}
else
{
waferPass2 = "Y";
}
//====Test 2. End======
......................
}
```
The REngine.GetInstance() Made the same if-else statement (Test 1 & Test 2) get different result.
Test 1 if statement is correct (return false). Test 2 statement return wrong result (return true).
What's happened in 'REngine regine = REngine.GetInstance()' ?
After run 'REngine.GetInstance()' The Test 2 if statement got wrong result.
I have no idea about this. Is this bug in RDotNet?
Thanks for your help.
I've added R.net via Manage NuGet Packages in VS2013 (RDotNet runtime Version v4.0.30319).
Within Windows 7 I'm running R-3.1.0 a within my C:\Program Files\R\R-3.1.0\bin folder.
Here's code as below:
```
public double StandardDeviation(double[] examples)
{
double STD = Double.NaN;
//====Test 1. Start======
int Oos1 = 2;
int SiteCount1 = 5;
string KeyItem1 = "60";
string waferPass1;
if ((Convert.ToDouble(Oos1) / Convert.ToDouble(SiteCount1)) >
((Convert.ToDouble(100) - Convert.ToDouble(KeyItem1))
/ Convert.ToDouble(100)))
//return false
{
waferPass1 = "N";
}
else
{
waferPass1 = "Y";
}
//====Test 1. End======
// Initial/Using R.Net Component
REngine regine = REngine.GetInstance();
//====Test 2. Start======
int Oos2 = 2;
int SiteCount2 = 5;
string KeyItem2 = "60";
string waferPass2;
if ((Convert.ToDouble(Oos2) / Convert.ToDouble(SiteCount2)) >
((Convert.ToDouble(100) - Convert.ToDouble(KeyItem2))
/ Convert.ToDouble(100)))
//return true
{
waferPass2 = "N";
}
else
{
waferPass2 = "Y";
}
//====Test 2. End======
......................
}
```
The REngine.GetInstance() Made the same if-else statement (Test 1 & Test 2) get different result.
Test 1 if statement is correct (return false). Test 2 statement return wrong result (return true).
What's happened in 'REngine regine = REngine.GetInstance()' ?
After run 'REngine.GetInstance()' The Test 2 if statement got wrong result.
I have no idea about this. Is this bug in RDotNet?
Thanks for your help.
↧
↧
New Post: R.Net which version of R is most appropriate?
Hi,
I've used nugget to install R.net to visual studio framework 4
It seems I need a version of R.
Should I install Microsoft R Open, Microsoft R Server, 'standard R' or something else?
ta
Stewart
I've used nugget to install R.net to visual studio framework 4
It seems I need a version of R.
Should I install Microsoft R Open, Microsoft R Server, 'standard R' or something else?
ta
Stewart
↧
New Post: RdotNet and R version 3.2.4
I also found the same issue with R-3.2.4revised-win. It works with 3.2.2 and I just tested with 3.2.5 (released 14/04/16) and it also works fine.
I noticed that the version string of R-3.2.4revised-win is "3.2.4 Revised" and I wonder if this is why RDotNet cannot detect it, because the string is not in the standard "x.y.z" format? Just a guess but seems possible since 3.2.3 and 3.2.5 both work.
I noticed that the version string of R-3.2.4revised-win is "3.2.4 Revised" and I wonder if this is why RDotNet cannot detect it, because the string is not in the standard "x.y.z" format? Just a guess but seems possible since 3.2.3 and 3.2.5 both work.
↧
New Post: Changing Interactive setting on already initialized R engine.
Does anyone have a way to toggle the interactive mode of the R engine once it's been initialized?
I'd like to be able to have the ability for the user to interact with the engine and then disable it in subsequent calls.
My main issue is the plot window (device) appearing while processing R commands and I'd like to suppress it.
I'd like to be able to have the ability for the user to interact with the engine and then disable it in subsequent calls.
My main issue is the plot window (device) appearing while processing R commands and I'd like to suppress it.
↧
New Post: Changing Interactive setting on already initialized R engine.
The interactive window I use is "identify()"
Basically I do this;
openGraphWindow(rescale = 'fit')
plot(x)
identify(...)
graphics.off()
"openGraphWindow" <- function(...)
{
Basically I do this;
openGraphWindow(rescale = 'fit')
plot(x)
identify(...)
graphics.off()
"openGraphWindow" <- function(...)
{
winDevice = which(names(dev.list())=='windows'); # if no window device open a new one, else using the existing
if (length(winDevice)<1) {
#dev.set(1)
windows(...)
winDevice = which(names(dev.list())=='windows');
} #else
dev.set(dev.list()[winDevice]);
default_PAR_settings();
}↧
↧
New Post: Changing Interactive setting on already initialized R engine.
Thanks scubaskier.
I was more looking to be able to modify (toggle) the SetupParameters Interactive setting in the engine.
I may have to further investigate your method because when I use Rdotnet integrated with my application and the engine attempts to evaluate the line contains plot, I want to suppress that window from being displayed to the enduser and not to wait for user interaction.
I was more looking to be able to modify (toggle) the SetupParameters Interactive setting in the engine.
I may have to further investigate your method because when I use Rdotnet integrated with my application and the engine attempts to evaluate the line contains plot, I want to suppress that window from being displayed to the enduser and not to wait for user interaction.
↧
New Post: Changing Interactive setting on already initialized R engine.
Hello midwestmaki,
I do not change the Interactive SetupParameter. I first call graphics.off()
Next I open one or more output devices (like pdf, png, etc.) and use dev.set() to direct the graph to the desired graphics format file.
I use sink() to redirect text output to a file as well.
↧
New Post: R.NET couldn´t find function in VB
I need use R in my ASP application. I am using RDotNet library and I need the T.TEST function of R. The code where I work with R:
I've executed the t.test in the .exe where my R is installed and it works ok. I don't know if it could be an error about REngine.SetEnvironmentVariables() but if I indicate the RHOME and RPATH it doesn´t work in that instruction:
Dim listNPS AS string="c <- (1,-1,0,1,1,1,1,1,1,1,1,1,0,0,0,0,0,-1)"
Dim listPeriodo AS string="c <- (1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0)"
REngine.SetEnvironmentVariables()
Dim engine As REngine = REngine.GetInstance
engine.Initialize()
Dim NPS As NumericVector = engine.Evaluate(listNPS).AsNumeric
Dim Periodo As IntegerVector = engine.Evaluate(listPeriodo).AsInteger
Dim testResult As GenericVector = engine.Evaluate("t.test(NPS, PERIODO)").AsList
Dim test_t As Double = testResult("p.value").AsNumeric().First()
engine.Dispose()
The error I obtain is "Couldn't find function t.test"I've executed the t.test in the .exe where my R is installed and it works ok. I don't know if it could be an error about REngine.SetEnvironmentVariables() but if I indicate the RHOME and RPATH it doesn´t work in that instruction:
Dim rhome As String = "C:\Program Files\R\R-3.2.5"
Dim rpath As String = "bin\i386"
Dim ruta As String = Path.Combine(rhome, rpath)
Thanks everyone!↧
Created Unassigned: CreateInstance [188]
Good Day,
Not sure of this project still being managed...
However, I am having issues creating an instance of the REngine. No matter what I do, I keep getting: "Dll was not found."
When able, can you please take a moment to look at the following [StackOverflow question](http://stackoverflow.com/questions/37140322/creating-an-instance-of-the-rengine-using-r-net-version-1-5-5)
Thank you :-)
Not sure of this project still being managed...
However, I am having issues creating an instance of the REngine. No matter what I do, I keep getting: "Dll was not found."
When able, can you please take a moment to look at the following [StackOverflow question](http://stackoverflow.com/questions/37140322/creating-an-instance-of-the-rengine-using-r-net-version-1-5-5)
Thank you :-)
↧
↧
New Post: Liner Regression results....
I've got some simple code to do linear reqression on 2 vectors (below). What I'm not sure is how to I get the results back into C#? What would the result types be? I'm particularly interested in model and coef.
Thanks
Thanks
var aVec = engine.CreateIntegerVector(new []{ 1, 2, 5 });
var bVec = engine.CreateIntegerVector(new []{ 12, 15, 20 });
engine.SetSymbol("a", aVec);
engine.SetSymbol("b", bVec);
engine.Evaluate("model = lm(a~b)"); // print out in the console
engine.Evaluate("summary(model)"); // print out in the console
engine.Evaluate("formula = formula(model)"); // print out in the console
engine.Evaluate("formula"); // print out in the console
engine.Evaluate("coef<-coefficients(model)"); // print out in the console
↧
New Post: Liner Regression results....
PhilBoyd,
try the following:
var interestingObject = engine.GetSymbol("model");
var interestingObject = engine.GetSymbol("coef");
another way would be to set your evaluation to a variable:
var result = engine.Evaluate("model = lm(a~b)");
var result = engine.Evaluate("coef<-coefficients(model)");
either way, you'll get some sort of SymbolicExpression object back from the engine. that you can play with.
Good luck.
try the following:
var interestingObject = engine.GetSymbol("model");
var interestingObject = engine.GetSymbol("coef");
another way would be to set your evaluation to a variable:
var result = engine.Evaluate("model = lm(a~b)");
var result = engine.Evaluate("coef<-coefficients(model)");
either way, you'll get some sort of SymbolicExpression object back from the engine. that you can play with.
Good luck.
↧
Reviewed: R.NET 1.5.19 (NuGet) (Jun 02, 2016)
Rated 4 Stars (out of 5) - Works great! Only thing missing is the ability to create more than one instance, which limits its use ...
↧
Created Unassigned: Could not find "predict" function in C# [189]
I have a simple call in C#:
var predict = rengine.Evaluate("predict").AsFunction();
When I use this from a console application it's working fine, but when I call it from an Web.Api service I get the error " object predict not found". I need to do something special when I use R.NET in a Web.Api?
var predict = rengine.Evaluate("predict").AsFunction();
When I use this from a console application it's working fine, but when I call it from an Web.Api service I get the error " object predict not found". I need to do something special when I use R.NET in a Web.Api?
↧
↧
New Post: Could not found "predict" function
I have a simple call in C#:
var predict = rengine.Evaluate("predict").AsFunction();
When I use this from a console application it's working fine, but when I call it from an Web.Api service I get the error " object predict not found". I need to do something special when I use R.NET in a Web.Api?
var predict = rengine.Evaluate("predict").AsFunction();
When I use this from a console application it's working fine, but when I call it from an Web.Api service I get the error " object predict not found". I need to do something special when I use R.NET in a Web.Api?
↧
New Post: How to use knit function in R.Net
I am trying to use Markdown files for generating reports and some plots but getting "StackOverFlowException" when I try to execute below line of code in my application
_engine.Evaluate("require(knitr)");
_engine.Evaluate("require(markdown)");
_engine.Evaluate("library(knitr)");
_engine.Evaluate("knit('ifile.Rmd', 'ifile2.md')");
Am i missing anything or executing knit is not allowed in R.Net ?↧
Created Unassigned: REngine.GetInstance() method goes in infinite loop after building application. [190]
I am using R.Net with my web application. I have hosted site in IIS 7 and written below simple code on click event of a button
```
protected void btnGetData_Click(object sender, EventArgs e)
{
//Get instance of REngine
REngine.SetEnvironmentVariables();
REngine engine = REngine.GetInstance();
}
```
My problem is, above code works fine for first time, but when I rebuild my solution then again run the same page, then the line engine = REngine.GetInstance(); goes into infinite loop.
I have also tried using engine.Dispose() method, but then it gives below error.
_The single REngine instance has already been disposed of (i.e. shut down). Multiple engine restart is not possible._
Can any body please help me out?.
```
protected void btnGetData_Click(object sender, EventArgs e)
{
//Get instance of REngine
REngine.SetEnvironmentVariables();
REngine engine = REngine.GetInstance();
}
```
My problem is, above code works fine for first time, but when I rebuild my solution then again run the same page, then the line engine = REngine.GetInstance(); goes into infinite loop.
I have also tried using engine.Dispose() method, but then it gives below error.
_The single REngine instance has already been disposed of (i.e. shut down). Multiple engine restart is not possible._
Can any body please help me out?.
↧