Picon
Gravatar

Possible bug in REXPDouble.NA?

Hi there,

The value of REXPDouble.NA seems to be NaN, while in REXPInteger and REXPLogical has a specific value. Is that correct, or it can be considered as a bug?

System.out.println("Double NA: " + REXPDouble.NA);
System.out.println("Integer NA: " + REXPInteger.NA);
System.out.println("Logical NA: " + REXPLogical.NA);

Double NA: NaN
Integer NA: -2147483648
Logical NA: -128

Cheers,

Víctor

Suresh Krishna | 24 Apr 17:44
Picon

Unable to run Rserve -dbg version


Hello,

I am having some trouble trying to run Rserve-dbg.so on Mac OS 10.6.

I am using:

alias Rservedbg="R CMD  
/Library/Frameworks/R.framework/Versions/Current/Resources/library/Rserve/libs/x86_64/Rserve-dbg.so"

Now:

Suresh-iMac:~ suresh$ Rservedbg
WARNING: ignoring environment value of R_HOME
Rserve 0.6-8 (338) (C)Copyright 2002-2011 Simon Urbanek
$Id: Rserv.c 338 2012-02-11 20:52:25Z urbanek $

Loading config file /etc/Rserv.conf
Failed to find config file /etc/Rserv.conf

R version 2.15.0 (2012-03-30)
Copyright (C) 2012 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

   Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

Rserve: Ok, ready to answer queries.

<... and here the Terminal hangs, I do not get the prompt back ...>

Hope there is an easy solution ?

Thanks, Suresh

Ian Fellows | 19 Apr 01:55
Picon

Re: problem installing Deducer on Windows 7 64-bit

Hum,

I'm moving this discussion over to the stats-rosuda-devel mailing
list, as it pertains to iplots not Deducer.

My windows VM is Vista 32-bit, and does not display the behavior that
you report. Can you load the JGR console (and iplots) using exe
launcher?

Best,
Ian

On Wed, Apr 18, 2012 at 2:45 PM, Phillip Holcomb <holcomb.phil <at> gmail.com> wrote:
> I'm running the standard R GUI.
>
> Here is the output from sessionInfo() after iplot hangs the library()
> call:
>
>> sessionInfo()
> R version 2.15.0 Patched (2012-04-09 r58947)
> Platform: x86_64-pc-mingw32/x64 (64-bit)
>
> locale:
> [1] LC_COLLATE=English_United States.1252
> [2] LC_CTYPE=English_United States.1252
> [3] LC_MONETARY=English_United States.1252
> [4] LC_NUMERIC=C
> [5] LC_TIME=English_United States.1252
>
> attached base packages:
> [1] stats     graphics  grDevices utils     datasets  methods
> base
>
> other attached packages:
> [1] JavaGD_0.5-5  scales_0.2.0  ggplot2_0.9.0 rJava_0.9-3
>
> loaded via a namespace (and not attached):
>  [1] colorspace_1.1-1   dichromat_1.2-4    digest_0.5.2
> grid_2.15.0
>  [5] MASS_7.3-17        memoise_0.1        munsell_0.3
> plyr_1.7.1
>  [9] proto_0.3-9.2      RColorBrewer_1.0-5 reshape2_1.2.1
> stringr_0.6
> [13] tools_2.15.0
>
> On Apr 18, 5:17 pm, Ian Fellows <ifell...@gmail.com> wrote:
>> Are you running Deducer in JGR or the default RGUI? what is the result
>> of sessionInfo() ?
>>
>> ian
>>
>>
>>
>>
>>
>>
>>
>> On Wed, Apr 18, 2012 at 1:44 PM, Phillip Holcomb <holcomb.p...@gmail.com> wrote:
>> > I am experiencing problems getting Deducer to run. In particular it
>> > seems to freeze the desktop R Console at the point where the iplots
>> > routines start to load. I isolated this as the likely culprit by
>> > loading the other necessary routines (e.g., rJave and JGR) one at a
>> > time using the library() function. When I try to execute
>> > library(iplots) R hangs. Any ideas?
>>
>> > Thanks

Mohit Dayal | 31 Mar 13:19
Picon

iplots : Moving points

Dear Rosuda group,

I am trying to develop an interactive clustering tool for which I require a graphics system that allows one to move points interactively. (That is, the user can brush one or more points, and then when the mouse is dragged, the points move along). GGobi has a nice implementation of this, but that system does not really provide me with all that I need (especially close R integration). Therefore I would like to work with iplots and add this feature.

I've gone through the source of iplots (at least the R side of things) and I see the function ivar.update. This would do quite nicely for me, but I've not been able to work out how to make iplots recognize a mouse drag event. (I'm guessing this needs the java side?) I would appreciate any and all help in this regard, and am ready to code the required parts myself.

Best,
Mohit Dayal
Researcher
Applied Statistics and Computing Lab
Indian School of Business
Hyderabad, India
www.isb.edu

Michael Bach | 28 Mar 13:42
Picon

Rserve server problems

Hi!

We are trying to use Rserve at work. I am using Rserve 0.6.1 on a Debian VirtualBox virtual machine as guest and a Windows 7 as host. I want to access Rserve through a little Java program as a test whether the port forwarding from localhost port 6311 to debian guest OS works (so Rserve can be accessed from the network). I checked whether the server is accepting connections via `telnet localhost 6311' from the debian guest - and it does. I then tried to connect from the Windows OS via this small Java program:

import org.rosuda.REngine.*;
import org.rosuda.REngine.Rserve.*;

public class Rserve_test {
    public static void main(String[] args) {
        try {
            System.out.println("test");
            RConnection c = new RConnection("localhost", 6311);
            REXP x = c.eval("R.version.string");
            System.out.println(x.asString());
        } catch (Exception ex) {
        ex.printStackTrace();
        }
    }
}

This fails with the backtrace:

org.rosuda.REngine.Rserve.RserveException: Handshake failed: expected 32 bytes header, got -1
    at org.rosuda.REngine.Rserve.RConnection.<init>(RConnection.java:107)
    at org.rosuda.REngine.Rserve.RConnection.<init>(RConnection.java:60)
    at at.ac.ait.fabianleimgruber.javar.Rserve_test.main(Rserve_test.java:10)

I found a thread reporting similar behaviour here
http://stackoverflow.com/questions/8925000/rserve-exception-handshake-failed that

I turned on debugging Rserve via Rserve(TRUE) on the debian machine and get the following messages:

Rserve: Ok, ready to answer queries.
connection accepted.
sending ID string.
malformed packet (n=5). closing socket to prevent garbage.
DUMP [5]: ff f4 ff fd 06
OUT.sendResp(void data)
DUMP [16]: 02 00 01 42 00 00 00 00 00 00 00 00 00 00 00 00
done.

Am I doing something wrong/missing something? Help is greatly appreciated.

Thanks and Best Regards,
Michael Bach

I.Andoh | 23 Mar 15:20
Picon

How to use Rengine

Dear sir;
Although the re operate with the following sample programs
the re2 does not operate but it becomes fatal error.
Please let me know whether what I should do.
 
 
import org.rosuda.JRI.REXP;
import org.rosuda.JRI.Rengine;
public class Rsample
{
    public static void main(String[] args)
    {
           
          Rengine re = new Rengine (new String[]{"--no-save"}, false, null);
        re.assign("a", new int[]{36});
        REXP result = re.eval("sqrt(a)");
        System.out.println(result.asDouble());
        re.end();
        
                  Rengine re2 = new Rengine (new String[]{"--no-save"}, false, null);
        re2.assign("b", new int[]{36});
        REXP result2 = re2.eval("sqrt(b)");
        System.out.println(result2.asDouble());
        re2.end();
   
}
}
 
error message
run:
6.0
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (0xc0000029), pid=6332, tid=11692
#
# JRE version: 7.0_02-b13
# Java VM: Java HotSpot(TM) Client VM (22.0-b10 mixed mode, sharing windows-x86 )
# Problematic frame:
# C  [ntdll.dll+0x90572]
#
# Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
#
# An error report file with more information is saved as:
# C:\NetBeans\Rsample\hs_err_pid6332.log
#
# If you would like to submit a bug report, please visit:
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
Java Result: 1
 

Best Regards,

I.Andoh

Iurie Malai | 20 Mar 16:00
Picon

Why JGR looks so different?

When I start JGR as a normal user, it looks like here:
http://farm7.staticflickr.com/6233/7000076003_8384b0662c_m.jpg.
When I start JGR with 'sudo' (as root), it looks like here:
http://farm8.staticflickr.com/7069/6853951548_c8964a08d5_m.jpg.
Why? From my point of view the second option is more clear (and
pleasant), but this is not a reason to run JGR everytime as a root.
Can I change this?

Regards,
Iurie Malai

How to install GNU R, JGR and Deducer in Ubuntu
https://sites.google.com/site/iuriemalai/en/how-to-install-gnu-r-jgr-and-deducer-in-ubuntu

_______________________________________________
stats-rosuda-devel mailing list
stats-rosuda-devel <at> listserv.uni-augsburg.de
http://mailman.rz.uni-augsburg.de/mailman/listinfo/stats-rosuda-devel
I.Andoh | 19 Mar 00:11
Picon

Rengine kill

Hello
 
I don’t kill Rengine.
I run next proguram but can’t  execute  “re.end();”.
 
How to kill the progran.
 
package jrtest;
 
import org.rosuda.JRI.REXP;
import org.rosuda.JRI.Rengine;
 
public class  JRtest {
public static void main(String[] args) {
      if (!Rengine.versionCheck()) {
        System.err.println("** Version mismatch - Java files don't match library version.");
        System.exit(1);
    }
    //start
     Rengine re = new Rengine (new String[]{"--no-save"}, false, null);
 
   double fluct[]={
         -1.510061151, -1.483533210 ,-2.454857885 ,-1.582381336, -2.189866550
, -1.259217396 , 0.122006351 ,-0.680441673 , 0.148050467 ,-0.424794143
, -0.606838795, -0.799486016 ,-0.184970425 , 0.666686479 ,-0.377533334
, -1.320383326, -0.756885509, -0.438778336 ,-1.031146806 , 0.191056368
, -1.154535333 ,-0.132690188 , 0.513218124  ,0.988845215 , 1.649814052
,  0.927037224 , 0.627193855 , 1.149564715 , 0.284609312 ,-0.054383389
, -0.645675322, -0.512513869 ,-0.443688139 , 0.148951284, -0.480104506
, 0.401391522 ,-0.007915557,  0.723504732 , 0.191544878, -0.544863121
,-0.055942539,  0.278057151,  1.922562703,  0.909566946 , 1.774394361
,  1.937790900,  0.921274700 , 1.278086288 , 1.063823536 , 1.014685088
,  0.384750044 , 0.898532960 , 0.436981014, -0.022530751 , 0.453789274
, -0.583885884 ,-1.115714711, -1.475849203 , 0.612645212,  1.711053651 };
     re.eval("library(\"fractal\")");
re.assign("fluct",fluct);
REXP result3 = re.eval("RoverS(fluct)}
System.out.println("Ros="+result3);
re.end();
 
 
Best Regard
 
I.Andoh
Iurie Malai | 7 Mar 19:38
Picon

How to kill/close JGR window from R concole?

Is this possible to kill JGR Console from R (in terminal)?
(I know how to close JGR from his own menu).

Regards,
Iurie

Picon
Favicon

Setting JGR as default R editor on Windows

Hi All,

I'd like to set JGR's program editor to be my default for R programs on my Windows 7 system. I tried
right-clicking on an R script and changing its "open with" property to JGR.exe. Now when I double-click on
a file with a ".R" extension, JGR starts, but it does not open the file into its program editor. If I follow
the exact same steps to return to RSTudio, it works just fine. Is there a setting I'm missing?

Thanks,
Bob

=========================================================
  Bob Muenchen (pronounced Min'-chen), Manager  
  Research Computing Support
  Voice: (865) 974-5230  
  Email: muenchen <at> utk.edu
  Web:   http://oit.utk.edu/research, 
  News:  http://oit.utk.edu/research/news.php
========================================================

Harsh | 27 Feb 14:26
Picon

Kafka consumer java client in R

I am looking to bring the Kafka consumer in R.
Kafka is a messaging system and produces-consumes events which are
encoded as Binary Avro format. In trying to consume these messages in
real time, many clients are available but none in R.

A pure R solution may not be viable, and I wanted to try my hands at
integrating the Java consumer client in R since the rJava package
makes it possible.

In doing so, I have to admit my limited Java programming skills and
not a very in-depth understanding of R internals and seek
advice/suggestions from expert users and developers on this list.

A few links to add more context to this goal;

Apache Kafka : http://incubator.apache.org/kafka/
Kafka Clients : https://github.com/apache/kafka/tree/trunk/clients
Related SO question :
http://stackoverflow.com/questions/9432045/kafka-consumer-in-r

I have looked at the tutorial
http://cran.r-project.org/web/packages/helloJavaWorld/vignettes/helloJavaWorld.pdf
and could understand at a very high-level what rJava facilitates.

Any suggestions/hints in this regard will be greatly appreciated.

Regards,
Harsh

--

-- 
http://about.me/harshsinghal


Gmane