From murdoch.duncan at gmail.com  Fri Dec 20 22:07:15 2013
From: murdoch.duncan at gmail.com (Duncan Murdoch)
Date: Fri, 20 Dec 2013 16:07:15 -0500
Subject: [Rd] Fwd: How to check if R interpreter is initiated
In-Reply-To: <CAGSjAUDWELeQyt6hQRjjeOb823+vva970fkb7FEjWbhiPUu3sQ@mail.gmail.com>
References: <CAGSjAUD+RTivxeWq=gwgDd=gaGUeFJPJbNXpb3abLshu9Fjaqg@mail.gmail.com>
	<CAGSjAUDWELeQyt6hQRjjeOb823+vva970fkb7FEjWbhiPUu3sQ@mail.gmail.com>
Message-ID: <52B4B183.1020409@gmail.com>

On 13-12-20 2:00 PM, Sandip Nandi wrote:
> Hi R-Developers ,
>
> I am using R-3.1 , moved from R-2.15 . I am facing a problem which I have
> raised in R bug report with bug 15596 .
>
> My problem is how to check if R is initiated before initiating R
>
> I am embedding R in parallel environment and reusing process already
> running to reduce overhead . Each process is running infinitely. So when a
> process is reused,it finds R is already initialized there and throws the
> error.
>
> Till 2.15 it was solved using R_Is_running variable . So I am assuming
> there should be some flag or return value in R-3.0.2 which provides the
> user with information if already initialized .
>
> Anyone has faced the problem ?
>
> It will be great if anyone could suggest alternate solution to this problem
> for R-3.0.

As you've already been told:  just maintain your own variable for this. 
  Before initializing R, set it to 0.  After initializing R, set it to 1.

Duncan Murdoch



[Rd] Fwd: How to check if R interpreter is initiated
Duncan Murdoch