Quantcast
Channel: R.NET
Viewing all 1634 articles
Browse latest View live

Created Issue: Make autoprint switchable [152]

$
0
0
Calling R_Print on all visible evaluations is problematic at usage, on large data especially. Make that a switch on the R engine, disabled by default.

Commented Issue: MaxMemorySize on Linux; issue if not default [137]

$
0
0
Conditions

```
cd ~/src/codeplex/rdotnet/TestApps/MeasureRuntime/bin/Debug
./MeasureRuntime.exe
```
works, however
```
./MeasureRuntime.exe 1000 24 ~/tmp/rdotnetruntimes.csv
```
does not. Gets the followins crash

```
*** Error in `/usr/bin/cli': double free or corruption (fasttop): 0x00000000028e6b40 ***
Stacktrace:
```

The init of the R engine fails because of the following being added to the command line argument
```
argv.Add("--max-mem-size=" + parameter.MaxMemorySize);
```

Comments: Trying again with Mono 3.10: ``` ./MeasureRuntime.exe 1000 26 ~/tmp/rdotnetruntimes.csv ``` ``` R->.NET numeric matrix; n=1.7e+007, deltaT=967.8648 ms R->.NET numeric matrix; n=3.4e+007, deltaT=1014.7165 ms Error: vector memory exhausted (limit reached?) ``` with a managed error stack. ``` Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object ``` This is acceptable behavior. Consider closing/resolving.

Edited Issue: MaxMemorySize on Linux; issue if not default [137]

$
0
0
Conditions

```
cd ~/src/codeplex/rdotnet/TestApps/MeasureRuntime/bin/Debug
./MeasureRuntime.exe
```
works, however
```
./MeasureRuntime.exe 1000 24 ~/tmp/rdotnetruntimes.csv
```
does not. Gets the followins crash

```
*** Error in `/usr/bin/cli': double free or corruption (fasttop): 0x00000000028e6b40 ***
Stacktrace:
```

The init of the R engine fails because of the following being added to the command line argument
```
argv.Add("--max-mem-size=" + parameter.MaxMemorySize);
```

Edited Unassigned: Parse exception but only sometimes [100]

$
0
0
Hi I have simple code,that 1 for 10 request edns with this error, any gues why ? multithreads or sth else?
![Image](http://i.imgur.com/8f1PixF.png)

it blows up in the first line

> engine.Evaluate("library(foreign)"


I have now more information about my problem,
I have simple web application to generate some report, so if I run this as single web page , one by one, it works like 8/10 times, but if I open this site in 3 tabs, and click them in the same time to generate report, then it fails,

I tried to make my report method thread safe this using
> Monitor.Enter(syncRoot);

So now I download source code to see where the exception fails and this is that part:
> if (!vector.First().TryEvaluate(GlobalEnvironment, out result))
Line 458: {
Line 459: throw new ParseException();
Line 460: }
Line 461: return result;

in deep I saw sth like this: Error: C stack usage is too close to the limit
Any help what I can do ?

Commented Unassigned: Parse exception but only sometimes [100]

$
0
0
Hi I have simple code,that 1 for 10 request edns with this error, any gues why ? multithreads or sth else?
![Image](http://i.imgur.com/8f1PixF.png)

it blows up in the first line

> engine.Evaluate("library(foreign)"


I have now more information about my problem,
I have simple web application to generate some report, so if I run this as single web page , one by one, it works like 8/10 times, but if I open this site in 3 tabs, and click them in the same time to generate report, then it fails,

I tried to make my report method thread safe this using
> Monitor.Enter(syncRoot);

So now I download source code to see where the exception fails and this is that part:
> if (!vector.First().TryEvaluate(GlobalEnvironment, out result))
Line 458: {
Line 459: throw new ParseException();
Line 460: }
Line 461: return result;

in deep I saw sth like this: Error: C stack usage is too close to the limit
Any help what I can do ?
Comments: Marking as resolved. Many contributions from skyguy94 answering questions and in form of code are likely to address this issue and more.

Closed Unassigned: R.NET not running from Xamarin Studio 4.2.3 [101]

$
0
0

See https://rdotnet.codeplex.com/workitem/95:

"However, it works with VS 2013 but does not work with Xamarin Studio 4.2.3, the code is exactly the same. Since Xamarin Studio 4.2.3 only supports x86, I change the path to C:\Program Files\R\R-3.0.3\bin\i386\R.dll but it does not work. The error is the same."

Clarify: not running in Xamarin Studio (debub mode; hosted process?). Targetting which CLR: .NET or Mono? etc.
Comments: Have not had problems running with Monodevelop on Linux and XS 5.x on Windows, as of Dec 2014.

Commented Issue: Make autoprint switchable [152]

$
0
0
Calling R_Print on all visible evaluations is problematic at usage, on large data especially. Make that a switch on the R engine, disabled by default.
Comments: I think that being able to disable it is a good idea, but I would be inclined to leave it enabled by default so that it matches R's default internal processing behavior. If it is disabled by default then ggplot2, lattice, etc... will not have any output by default, which is confusing unless someone already understands R and R.Net's place in that stack.

Created Issue: resizing plots generated from console using R.Net causes application to crash [153]

$
0
0
See http://stackoverflow.com/questions/27612311/resizing-plots-generated-using-r-net-causes-application-to-crash

Commented Issue: resizing plots generated from console using R.Net causes application to crash [153]

$
0
0
See http://stackoverflow.com/questions/27612311/resizing-plots-generated-using-r-net-causes-application-to-crash
Comments: I can't find a problem with this with trivial WinForms or WPF apps, is there some sample scenario information that could be added?

New Post: R.NET can not get instance at server

$
0
0
First off, I'm very sorry for the long delay. The holidays, conferences, and work tasks got the better of me.

The hang at setup_Rmainloop typical happens during an attempt at an engine re-init. My first suspicion about your code and issue is the reason it works fine under IIS Express, but when you move it to IIS is that you have an issue with your AppPool recycling. Of course, that doesn't make much sense since the app pool is supposed to be a process boundary, but I wonder if that's the only application you have running using R.Net in that AppPool? Of course, I don't understand why I can replicate it on my local machine. I'm going to spin up an ec2 instance and see what I can make happen there.

I'm going to keep looking at it. I don't know where you are located, or if you do conferences much, but I'll be at codemash next week if you want to collaborate. Perhaps we skype sometime tues or weds and you can demo the issue? I'm very intrigued by it (my poor response not withstanding).

Blue Skies,
Ritch

New Post: R.NET can not get instance at server

$
0
0
Oh, and if you wanted to open this as in issue on github, I'd really appreciate it. Codeplex is killing me.

Commented Unassigned: SetEnvironmentVariables [128]

$
0
0
when i call REngine.SetEnvironmentVariables(); it throws an error:

Windows Registry sub-key 'R' of key 'HKEY_LOCAL_MACHINE\SOFTWARE\R-core' was not found

but actually, there is such a key in this folder.

i can find such lists in my registry.

HKEY_LOCAL_MACHINE\SOFTWARE\R-core\R\3.0.1
HKEY_LOCAL_MACHINE\SOFTWARE\R-core\R64\3.0.1


anyone can help me with this?

thanks in advance.
Comments: I ran into this problem as well. My issue was that I only installed the x64 version of R 3.1.1 I uninstalled, redownloaded, and installed both the x86 and x64 versions, and then I was able to use "REngine.GetInstance()"

New Post: R.NET can not get instance at server

$
0
0
Thank you so much Ritch! It is really nice of you, I am very moved! I also replied so late due to long holidays and getting sick after long holidays, so don't you feel sorry.

I am in Germany so probably will miss the conference, pity. But if you have some time to kill, skype might be a fine idea.

So back to the topic, that web application is the only application in my AppPool. So I don't know if it has anything to do with AppPool recycling. I used to restart Rengine inside my web application, then I got a clear error message saying Rengine cannot be reinitialized. But this time there is no error but just hanging.

I am actually surprised to hear that you could not replicate on your machine. Maybe there is just some dumb mistake I did not notice (if so it will make everything so much easier).

I have opened an issue on github here if you are interested: https://github.com/EcologyRocks/TestRWebsite/issues/1

So thanks again! Look forward to hear from you!

Cheers,
Amy

New Post: [R.NET Last release - CREATE MULTIPLE ENGINES]

$
0
0
Hi R.Net guys

After downloading and installing the last release of R.Net I try to create multiple instances of REngine in order to realise many parallelized computation with R (An Rengine in each C# thread).

However, I have problem I think the new version allow us to get some REngine instances but each instance seems using the same R session so impossible to use parallelized computation. Hence my test code:

REngine.SetEnvironmentVariables(); // <-- May be omitted; the next line would call it.
            var engine = REngine.GetInstance();
            var engine2 = REngine.GetInstance();
            engine.Initialize(); engine2.Initialize();
            engine.Evaluate("a <- 1");
            var a = engine.GetSymbol("a").AsInteger();
I hope some body can help me.

Thank you for your time.

New Post: [R.NET Last release - CREATE MULTIPLE ENGINES]

$
0
0
Hi R.Net guys

After downloading and installing the last release of R.Net I try to create multiple instances of REngine in order to realise many parallelized computation with R (An Rengine in each C# thread).

However, I have problem I think the new version allow us to get some REngine instances but each instance seems using the same R session so impossible to use parallelized computation. Hence my test code:

REngine.SetEnvironmentVariables(); // <-- May be omitted; the next line would call it.
            var engine = REngine.GetInstance();
            var engine2 = REngine.GetInstance();
            engine.Initialize(); engine2.Initialize();
            engine.Evaluate("a <- 1");
            var a = engine.GetSymbol("a").AsInteger();
I hope some body can help me.

Thank you for your time.

New Post: [R.NET Last release - CREATE MULTIPLE ENGINES]

$
0
0
Hi R.Net guys

After downloading and installing the last release of R.Net I try to create multiple instances of REngine in order to realise many parallelized computation with R (An Rengine in each C# thread).

However, I have problem I think the new version allow us to get some REngine instances but each instance seems using the same R session so impossible to use parallelized computation. Hence my test code:

REngine.SetEnvironmentVariables(); // <-- May be omitted; the next line would call it.
            var engine = REngine.GetInstance();
            var engine2 = REngine.GetInstance();
            engine.Initialize(); engine2.Initialize();
            engine.Evaluate("a <- 1");
            var a = engine.GetSymbol("a").AsInteger();
I hope some body can help me.

Thank you for your time.

New Post: [R.NET Last release - CREATE MULTIPLE ENGINES]

$
0
0
TL;DR - You can't have multiple R engines with a single R.Net process.

In R.Net the unmanaged R dlls get loaded into the process and there currently isn't a way to load R as a separate process and setup some sort of IPC mechanism. We've been talking about how to do that, but it just doesn't exist yet. You can run your process in parallel so that R.Net is hosted in each of your processes.

An approach that works with R.Net without having to grapple with process management is to use the "snow" and "foreach" packages from CRAN. You'll find quite a few tutorials and examples on Google that work pretty well. I've only tinkered with it for my own amusement, so I can't add much in the way of helpful advice.


Blue Skies,
Ritch

New Post: [R.NET Last release - CREATE MULTIPLE ENGINES]

$
0
0
Thant you skyguy94 for your reply and your advices, I understand why my test code does not work. I will look "snow" and "foreach" as you advised me.

New Post: CodeMash Shoutout for RDotNet

New Post: Returning a time series to .net using r packages xts or zoo.

$
0
0
I am trying to call a function in R that can return a time series as tx, xts, or zoo format. In all cases, r.net does not return the dates. It will only return the stock prices.

The following code returns null

command = "IndexValues <- Quandl(\"EOD/SPY\", authcode=\"myauthcode\", start_date=\"2014-01-01\", type = \"xts\")",
DataFrame df = rEngine.Evaluate(command).AsDataFrame(); // returns null
var t1 = rEngine.GetSymbol("IndexValues").AsDataFrame(); // returns null

If I change the type to "zoo", or "raw" or "ts", they all return null. If I cast to a list, it will return the stock prices without dates.

Any ideas?
Viewing all 1634 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>