Re: [Rd] print(...,digits=2) behavior

2011-03-08 Thread Terry Therneau
>> This affects _many_ *.Rout.save checks in packages.

  I assume this is in the R-devel branch.

 I've got an addition to survival nearly ready to go (faster concordance
calculation).  At what point should I should I switch over to the newer
version, fix up my .out files etc, to best mesh with the automatic
checks on CRAN?  

   It's a nuisance for me to update, but only a nuisance.  I've been
through it twice before (Splus version 4-> 5 and Splus -> R switch).  I
might as well time it so as to make life as easy as possible for you
folks. Thanks for all the hard work.

Terry T

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


[Rd] function local to a fit

2011-03-08 Thread Terry Therneau
  I've added a time-transform ability to coxph: here is an example

fit <- coxph(Surv(time, status) ~ age + tt(age) + sex, data=lung,
tt=function(x, t, ...) x*log(t) )

The only role for tt() in the formula is to be noticed as a specials by
terms().  I currently have tt defined as a function
tt <- function(x) 
It has to be exported in the namespace, documented, etc.

Is there a way to make tt() local to coxph, but still be found by
model.frame, so that it does not have to be global?   It would seem to
be neater to do a marker transform like s() in gam, cluster() in coxph,
etc in this way, where the meaning is local to the enclosing function.

Terry Therneau

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


[Rd] How to disable R's crash prompt

2011-03-08 Thread Wayne.Zhang
Dear R devel,

I have a C++ app that calls into embedded R to perform some analytic 
calculations.  When my app encounters a segmentation fault, R always prints the 
following crash prompt and asks me to enter an action:


*** caught segfault ***
address 0x8, cause 'memory not mapped'

Possible actions:
1: abort (with core dump, if enabled)
2: normal R exit
3: exit R without saving workspace
4: exit R saving workspace



The problem is my app will be run in non-interactive mode, so there is no way 
for me to enter the action.  Is there a way to disable the crash prompt and 
have R simply crash the whole app?  I have tried using "-file=/dev/null", 
"-slave", "-vanilla", and pretty much all other start options, to no avail.

Thanks in advance for your help,

Wayne

___

This e-mail may contain information that is confidential, privileged or 
otherwise protected from disclosure. If you are not an intended recipient of 
this e-mail, do not duplicate or redistribute it by any means. Please delete it 
and any attachments and notify the sender that you have received it in error. 
Unless specifically indicated, this e-mail is not an offer to buy or sell or a 
solicitation to buy or sell any securities, investment products or other 
financial product or service, an official confirmation of any transaction, or 
an official statement of Barclays. Any views or opinions presented are solely 
those of the author and do not necessarily represent those of Barclays. This 
e-mail is subject to terms available at the following link: 
www.barcap.com/emaildisclaimer. By messaging with Barclays you consent to the 
foregoing.  Barclays Capital is the investment banking division of Barclays 
Bank PLC, a company registered in England (number 1026167) with its registered 
offi!
 ce at 1 Churchill Place, London, E14 5HP.  This email may relate to or be sent 
from other members of the Barclays Group.
___

[[alternative HTML version deleted]]

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] How to disable R's crash prompt

2011-03-08 Thread Prof Brian Ripley

On Tue, 8 Mar 2011, wayne.zh...@barclayscapital.com wrote:


Dear R devel,

I have a C++ app that calls into embedded R to perform some analytic 
calculations.  When my app encounters a segmentation fault, R always 
prints the following crash prompt and asks me to enter an action:



*** caught segfault ***
address 0x8, cause 'memory not mapped'

Possible actions:
1: abort (with core dump, if enabled)
2: normal R exit
3: exit R without saving workspace
4: exit R saving workspace



The problem is my app will be run in non-interactive mode, so there 
is no way for me to enter the action.  Is there a way to disable the


R does not do that in 'non-interactive mode'. Take a look at the 
code: that section is conditional on R_Interactive.


crash prompt and have R simply crash the whole app?  I have tried 
using "-file=/dev/null", "-slave", "-vanilla", and pretty much all 
other start options, to no avail.


They do not control if R is interactive: the front-end (yours, I 
presume since you mention embedding but do not otherwise give any 
details) does.



Thanks in advance for your help,

Wayne


--
Brian D. Ripley,  rip...@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel:  +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UKFax:  +44 1865 272595

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] How to disable R's crash prompt

2011-03-08 Thread Dirk Eddelbuettel

On 8 March 2011 at 09:24, wayne.zh...@barclayscapital.com wrote:
| Dear R devel,
| 
| I have a C++ app that calls into embedded R to perform some analytic 
calculations.  When my app encounters a segmentation fault, R always prints the 
following crash prompt and asks me to enter an action:
| 
| 
| *** caught segfault ***
| address 0x8, cause 'memory not mapped'
| 
| Possible actions:
| 1: abort (with core dump, if enabled)
| 2: normal R exit
| 3: exit R without saving workspace
| 4: exit R saving workspace
| 
| 
| 
| The problem is my app will be run in non-interactive mode, so there is no way 
for me to enter the action.  Is there a way to disable the crash prompt and 
have R simply crash the whole app?  I have tried using "-file=/dev/null", 
"-slave", "-vanilla", and pretty much all other start options, to no avail.

Are you using RInside?  You could try rebuilding it with the this (from
src/RInside.cpp) set to true

bool verbose = false;

as well as with possibly more debugging output added to the RInside
destructor (where I removed a few commented-out lines for brevity):

RInside::~RInside() {   // now empty as MemBuf is internal
logTxt("RInside::dtor BEGIN", verbose);
R_dot_Last();
R_RunExitFinalizers();
R_CleanTempDir();
Rf_endEmbeddedR(0);
logTxt("RInside::dtor END", verbose);
instance_ = 0 ;
}

to at least confirm that you get here.  And if you really,really wanted to I
suppose you could try to do without some of these cleanup and finalizer
functions. But I think that would send you into somewhat uncharted territory,
so you probably want to do read Section 8.1 ("8.1 Embedding R under
Unix-alikes") of Writing R Extension carefully.  Best bet may still be to
avoid the segfault alltogether if you can.

Hope this helps, Dirk

-- 
Dirk Eddelbuettel | e...@debian.org | http://dirk.eddelbuettel.com

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] How to disable R's crash prompt

2011-03-08 Thread Barry Rowlingson
On Tue, Mar 8, 2011 at 2:24 PM,   wrote:
> Dear R devel,
>
> I have a C++ app that calls into embedded R to perform some analytic 
> calculations.  When my app encounters a segmentation fault, R always prints 
> the following crash prompt and asks me to enter an action:
>
>
> *** caught segfault ***
> address 0x8, cause 'memory not mapped'
>
> Possible actions:
> 1: abort (with core dump, if enabled)
> 2: normal R exit
> 3: exit R without saving workspace
> 4: exit R saving workspace
>
>
>
> The problem is my app will be run in non-interactive mode, so there is no way 
> for me to enter the action.  Is there a way to disable the crash prompt and 
> have R simply crash the whole app?  I have tried using "-file=/dev/null", 
> "-slave", "-vanilla", and pretty much all other start options, to no avail.

 If someone from Barclays Capital is writing programs that are being
allowed to seg fault and they want to *ignore* the seg fault then I'm
taking all my money away from Barclays Capital and keeping it away.
Barclays Capital, the bank that likes to say "seg fault".

 Your code can't possibly seg fault - our governments are always
telling us banks are too big to fail.

 That's enough banker bashing.

Barry

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] Problem building R-2.13 r54683 on Windows

2011-03-08 Thread Dan Tenenbaum
On Mon, Mar 7, 2011 at 11:00 AM, Dan Tenenbaum  wrote:
> Hi, Unfortunately it looks like this problem has somehow been reintroduced.
>

Looks like this has now been fixed. Many thanks!
Dan


> I am now trying to build R-devel 54683 from source, again following
> the manual. I get the same error as below:
>
> gcc -std=gnu99 -I../../include -DHAVE_CONFIG_H  -O3 -Wall -pedantic
> -c zutil.c -o zutil.
> o
> make[4]: *** No rule to make target `Rzlib.def', needed by `Rzlib.dll'.  Stop.
> make[3]: *** [rlibs] Error 1
> make[2]: *** [../../bin/i386/R.dll] Error 2
> make[1]: *** [rbuild] Error 2
> make: *** [all] Error 2
>
> Hope someone can have a look.
> Thanks
> Dan
>
>
> On Thu, Mar 3, 2011 at 10:50 AM, Dan Tenenbaum  wrote:
>> I am building R-2.13 r54645 from source as described here:
>> http://cran.r-project.org/doc/manuals/R-admin.html#Building-from-source
>> The "make all recommended" command ends as follows on both 32 and 64-bit
>> Windows (Windows Server 2003 R2 Enterprise Edition Service Pack 2 and
>> Windows Server 2008 R2 Enterprise):
>> gcc -std=gnu99 -I../../include -DHAVE_CONFIG_H  -O3 -Wall -pedantic   -c
>> zutil.c -o z
>> o
>> make[4]: *** No rule to make target `Rzlib.def', needed by `Rzlib.dll'.
>>  Stop.
>> make[3]: *** [rlibs] Error 1
>> make[2]: *** [../../bin/i386/R.dll] Error 2
>> make[1]: *** [rbuild] Error 2
>> make: *** [all] Error 2
>> Thanks
>> Dan
>>
>

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] How to disable R's crash prompt

2011-03-08 Thread Wayne.Zhang
Thanks for your quick comment Mr. Ripley.  I'm a newbie in R so excuse me for 
not knowing the obvious.  Could you elaborate on what code I should look at, 
and what documentation I should go to?

This is my C++ code on calling embedded R (on redhat enterprise linux 4):

char *localArgs[] = { "R", "--silent" };  // tried --slave, -f, --vanilla 
too
Rf_initEmbeddedR(sizeof(localArgs)/sizeof(localArgs[0]), localArgs);

PROTECT(load = lang2(install("source"), mkString(file.c_str(;   // file 
contains R code
R_tryEval(load, R_GlobalEnv, &errorOccurred);

PROTECT(call = lang2(install(entryPoint.c_str()), input));// entry 
point is an R function defined in "file" above
PROTECT(output = R_tryEval(call, R_GlobalEnv, &errorOccurred));

UNPROTECT(3);


What should I do in C++ to make R non-interactive?

Thanks,
Wayne


-Original Message-
From: Prof Brian Ripley [mailto:rip...@stats.ox.ac.uk] 
Sent: Tuesday, March 08, 2011 9:51 AM
To: Zhang, Wayne: IT (NYK)
Cc: r-devel@r-project.org
Subject: Re: [Rd] How to disable R's crash prompt

On Tue, 8 Mar 2011, wayne.zh...@barclayscapital.com wrote:

> Dear R devel,
>
> I have a C++ app that calls into embedded R to perform some analytic 
> calculations.  When my app encounters a segmentation fault, R always 
> prints the following crash prompt and asks me to enter an action:
>
>
> *** caught segfault ***
> address 0x8, cause 'memory not mapped'
>
> Possible actions:
> 1: abort (with core dump, if enabled)
> 2: normal R exit
> 3: exit R without saving workspace
> 4: exit R saving workspace
>
>
>
> The problem is my app will be run in non-interactive mode, so there 
> is no way for me to enter the action.  Is there a way to disable the

R does not do that in 'non-interactive mode'. Take a look at the 
code: that section is conditional on R_Interactive.

> crash prompt and have R simply crash the whole app?  I have tried 
> using "-file=/dev/null", "-slave", "-vanilla", and pretty much all 
> other start options, to no avail.

They do not control if R is interactive: the front-end (yours, I 
presume since you mention embedding but do not otherwise give any 
details) does.

> Thanks in advance for your help,
>
> Wayne

-- 
Brian D. Ripley,  rip...@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel:  +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UKFax:  +44 1865 272595
___

This e-mail may contain information that is confidential, privileged or 
otherwise protected from disclosure. If you are not an intended recipient of 
this e-mail, do not duplicate or redistribute it by any means. Please delete it 
and any attachments and notify the sender that you have received it in error. 
Unless specifically indicated, this e-mail is not an offer to buy or sell or a 
solicitation to buy or sell any securities, investment products or other 
financial product or service, an official confirmation of any transaction, or 
an official statement of Barclays. Any views or opinions presented are solely 
those of the author and do not necessarily represent those of Barclays. This 
e-mail is subject to terms available at the following link: 
www.barcap.com/emaildisclaimer. By messaging with Barclays you consent to the 
foregoing.  Barclays Capital is the investment banking division of Barclays 
Bank PLC, a company registered in England (number 1026167) with its registered 
offi!
 ce at 1 Churchill Place, London, E14 5HP.  This email may relate to or be sent 
from other members of the Barclays Group.

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] How to disable R's crash prompt

2011-03-08 Thread Wayne.Zhang
Hi Dirk,

My code on calling embedded R from C++ is attached in the other mail.

As you see, I'm not using RInside.  My app already works (except when it seg 
faults) so I prefer not to change it.  

Thanks,
Wayne


-Original Message-
From: Dirk Eddelbuettel [mailto:e...@debian.org] 
Sent: Tuesday, March 08, 2011 10:10 AM
To: Zhang, Wayne: IT (NYK)
Cc: r-devel@r-project.org
Subject: Re: [Rd] How to disable R's crash prompt


On 8 March 2011 at 09:24, wayne.zh...@barclayscapital.com wrote:
| Dear R devel,
| 
| I have a C++ app that calls into embedded R to perform some analytic 
calculations.  When my app encounters a segmentation fault, R always prints the 
following crash prompt and asks me to enter an action:
| 
| 
| *** caught segfault ***
| address 0x8, cause 'memory not mapped'
| 
| Possible actions:
| 1: abort (with core dump, if enabled)
| 2: normal R exit
| 3: exit R without saving workspace
| 4: exit R saving workspace
| 
| 
| 
| The problem is my app will be run in non-interactive mode, so there is no way 
for me to enter the action.  Is there a way to disable the crash prompt and 
have R simply crash the whole app?  I have tried using "-file=/dev/null", 
"-slave", "-vanilla", and pretty much all other start options, to no avail.

Are you using RInside?  You could try rebuilding it with the this (from
src/RInside.cpp) set to true

bool verbose = false;

as well as with possibly more debugging output added to the RInside
destructor (where I removed a few commented-out lines for brevity):

RInside::~RInside() {   // now empty as MemBuf is internal
logTxt("RInside::dtor BEGIN", verbose);
R_dot_Last();
R_RunExitFinalizers();
R_CleanTempDir();
Rf_endEmbeddedR(0);
logTxt("RInside::dtor END", verbose);
instance_ = 0 ;
}

to at least confirm that you get here.  And if you really,really wanted to I
suppose you could try to do without some of these cleanup and finalizer
functions. But I think that would send you into somewhat uncharted territory,
so you probably want to do read Section 8.1 ("8.1 Embedding R under
Unix-alikes") of Writing R Extension carefully.  Best bet may still be to
avoid the segfault alltogether if you can.

Hope this helps, Dirk

-- 
Dirk Eddelbuettel | e...@debian.org | http://dirk.eddelbuettel.com
___

This e-mail may contain information that is confidential, privileged or 
otherwise protected from disclosure. If you are not an intended recipient of 
this e-mail, do not duplicate or redistribute it by any means. Please delete it 
and any attachments and notify the sender that you have received it in error. 
Unless specifically indicated, this e-mail is not an offer to buy or sell or a 
solicitation to buy or sell any securities, investment products or other 
financial product or service, an official confirmation of any transaction, or 
an official statement of Barclays. Any views or opinions presented are solely 
those of the author and do not necessarily represent those of Barclays. This 
e-mail is subject to terms available at the following link: 
www.barcap.com/emaildisclaimer. By messaging with Barclays you consent to the 
foregoing.  Barclays Capital is the investment banking division of Barclays 
Bank PLC, a company registered in England (number 1026167) with its registered 
offi!
 ce at 1 Churchill Place, London, E14 5HP.  This email may relate to or be sent 
from other members of the Barclays Group.

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


[Rd] Fatal error: unable to open the base package (R, C++, Windows 7)

2011-03-08 Thread Olga Starunova
Hello!
I am trying to connect R with C++ via RInside package (OS: Windows 7, 
developing enviroment: CodeBlocks).



When my project runs I have the "Fatal error: unable to open the base package". 



I guess that this problem occurs during unsuccessful attempt to open file 
"base" in  ...\R-2.12.2\src\main\startup.c:



(

...

FILE *R_OpenLibraryFile(const char *file)

{

char buf[259];

FILE *fp;

 

snprintf(buf, 259, "%s/library/base/R/%s", R_home, file);

fp = R_fopen(buf, "r");

return fp;

} 

 

Obviously, it returns NULL).

 

I don't know, how it can be corrected.



I appreciate for any help very much.



Starunova Olga

Moscow State University

bogadele...@mail.ru

 

 

[[alternative HTML version deleted]]

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] How to disable R's crash prompt

2011-03-08 Thread Simon Urbanek

On Mar 8, 2011, at 10:01 AM,  
 wrote:

> Thanks for your quick comment Mr. Ripley.  I'm a newbie in R so excuse me for 
> not knowing the obvious.  Could you elaborate on what code I should look at, 
> and what documentation I should go to?
> 
> This is my C++ code on calling embedded R (on redhat enterprise linux 4):
> 
>char *localArgs[] = { "R", "--silent" };  // tried --slave, -f, --vanilla 
> too
>Rf_initEmbeddedR(sizeof(localArgs)/sizeof(localArgs[0]), localArgs);
> 

R_Interactive = FALSE;


>PROTECT(load = lang2(install("source"), mkString(file.c_str(;  // file 
> contains R code
>R_tryEval(load, R_GlobalEnv, &errorOccurred);
> 
>PROTECT(call = lang2(install(entryPoint.c_str()), input));// entry 
> point is an R function defined in "file" above
>PROTECT(output = R_tryEval(call, R_GlobalEnv, &errorOccurred));
> 
>UNPROTECT(3);
> 
> 
> What should I do in C++ to make R non-interactive?
> 
> Thanks,
> Wayne
> 
> 
> -Original Message-
> From: Prof Brian Ripley [mailto:rip...@stats.ox.ac.uk] 
> Sent: Tuesday, March 08, 2011 9:51 AM
> To: Zhang, Wayne: IT (NYK)
> Cc: r-devel@r-project.org
> Subject: Re: [Rd] How to disable R's crash prompt
> 
> On Tue, 8 Mar 2011, wayne.zh...@barclayscapital.com wrote:
> 
>> Dear R devel,
>> 
>> I have a C++ app that calls into embedded R to perform some analytic 
>> calculations.  When my app encounters a segmentation fault, R always 
>> prints the following crash prompt and asks me to enter an action:
>> 
>> 
>> *** caught segfault ***
>> address 0x8, cause 'memory not mapped'
>> 
>> Possible actions:
>> 1: abort (with core dump, if enabled)
>> 2: normal R exit
>> 3: exit R without saving workspace
>> 4: exit R saving workspace
>> 
>> 
>> 
>> The problem is my app will be run in non-interactive mode, so there 
>> is no way for me to enter the action.  Is there a way to disable the
> 
> R does not do that in 'non-interactive mode'. Take a look at the 
> code: that section is conditional on R_Interactive.
> 
>> crash prompt and have R simply crash the whole app?  I have tried 
>> using "-file=/dev/null", "-slave", "-vanilla", and pretty much all 
>> other start options, to no avail.
> 
> They do not control if R is interactive: the front-end (yours, I 
> presume since you mention embedding but do not otherwise give any 
> details) does.
> 
>> Thanks in advance for your help,
>> 
>> Wayne
> 
> -- 
> Brian D. Ripley,  rip...@stats.ox.ac.uk
> Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
> University of Oxford, Tel:  +44 1865 272861 (self)
> 1 South Parks Road, +44 1865 272866 (PA)
> Oxford OX1 3TG, UKFax:  +44 1865 272595
> ___
> 
> This e-mail may contain information that is confidential, privileged or 
> otherwise protected from disclosure. If you are not an intended recipient of 
> this e-mail, do not duplicate or redistribute it by any means. Please delete 
> it and any attachments and notify the sender that you have received it in 
> error. Unless specifically indicated, this e-mail is not an offer to buy or 
> sell or a solicitation to buy or sell any securities, investment products or 
> other financial product or service, an official confirmation of any 
> transaction, or an official statement of Barclays. Any views or opinions 
> presented are solely those of the author and do not necessarily represent 
> those of Barclays. This e-mail is subject to terms available at the following 
> link: www.barcap.com/emaildisclaimer. By messaging with Barclays you consent 
> to the foregoing.  Barclays Capital is the investment banking division of 
> Barclays Bank PLC, a company registered in England (number 1026167) with its 
> registered of!
 fi!
> ce at 1 Churchill Place, London, E14 5HP.  This email may relate to or be 
> sent from other members of the Barclays Group.
> 
> __
> R-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
> 
> 

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] How to disable R's crash prompt

2011-03-08 Thread Wayne.Zhang
That did the trick.  Thank you soo much Simon!

Wayne


-Original Message-
From: Simon Urbanek [mailto:simon.urba...@r-project.org] 
Sent: Tuesday, March 08, 2011 5:28 PM
To: Zhang, Wayne: IT (NYK)
Cc: rip...@stats.ox.ac.uk; r-devel@r-project.org
Subject: Re: [Rd] How to disable R's crash prompt


On Mar 8, 2011, at 10:01 AM,  
 wrote:

> Thanks for your quick comment Mr. Ripley.  I'm a newbie in R so excuse me for 
> not knowing the obvious.  Could you elaborate on what code I should look at, 
> and what documentation I should go to?
> 
> This is my C++ code on calling embedded R (on redhat enterprise linux 4):
> 
>char *localArgs[] = { "R", "--silent" };  // tried --slave, -f, --vanilla 
> too
>Rf_initEmbeddedR(sizeof(localArgs)/sizeof(localArgs[0]), localArgs);
> 

R_Interactive = FALSE;


>PROTECT(load = lang2(install("source"), mkString(file.c_str(;  // file 
> contains R code
>R_tryEval(load, R_GlobalEnv, &errorOccurred);
> 
>PROTECT(call = lang2(install(entryPoint.c_str()), input));// entry 
> point is an R function defined in "file" above
>PROTECT(output = R_tryEval(call, R_GlobalEnv, &errorOccurred));
> 
>UNPROTECT(3);
> 
> 
> What should I do in C++ to make R non-interactive?
> 
> Thanks,
> Wayne
> 
> 
> -Original Message-
> From: Prof Brian Ripley [mailto:rip...@stats.ox.ac.uk] 
> Sent: Tuesday, March 08, 2011 9:51 AM
> To: Zhang, Wayne: IT (NYK)
> Cc: r-devel@r-project.org
> Subject: Re: [Rd] How to disable R's crash prompt
> 
> On Tue, 8 Mar 2011, wayne.zh...@barclayscapital.com wrote:
> 
>> Dear R devel,
>> 
>> I have a C++ app that calls into embedded R to perform some analytic 
>> calculations.  When my app encounters a segmentation fault, R always 
>> prints the following crash prompt and asks me to enter an action:
>> 
>> 
>> *** caught segfault ***
>> address 0x8, cause 'memory not mapped'
>> 
>> Possible actions:
>> 1: abort (with core dump, if enabled)
>> 2: normal R exit
>> 3: exit R without saving workspace
>> 4: exit R saving workspace
>> 
>> 
>> 
>> The problem is my app will be run in non-interactive mode, so there 
>> is no way for me to enter the action.  Is there a way to disable the
> 
> R does not do that in 'non-interactive mode'. Take a look at the 
> code: that section is conditional on R_Interactive.
> 
>> crash prompt and have R simply crash the whole app?  I have tried 
>> using "-file=/dev/null", "-slave", "-vanilla", and pretty much all 
>> other start options, to no avail.
> 
> They do not control if R is interactive: the front-end (yours, I 
> presume since you mention embedding but do not otherwise give any 
> details) does.
> 
>> Thanks in advance for your help,
>> 
>> Wayne
> 
> -- 
> Brian D. Ripley,  rip...@stats.ox.ac.uk
> Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
> University of Oxford, Tel:  +44 1865 272861 (self)
> 1 South Parks Road, +44 1865 272866 (PA)
> Oxford OX1 3TG, UKFax:  +44 1865 272595
> ___
> 
> This e-mail may contain information that is confidential, privileged or 
> otherwise protected from disclosure. If you are not an intended recipient of 
> this e-mail, do not duplicate or redistribute it by any means. Please delete 
> it and any attachments and notify the sender that you have received it in 
> error. Unless specifically indicated, this e-mail is not an offer to buy or 
> sell or a solicitation to buy or sell any securities, investment products or 
> other financial product or service, an official confirmation of any 
> transaction, or an official statement of Barclays. Any views or opinions 
> presented are solely those of the author and do not necessarily represent 
> those of Barclays. This e-mail is subject to terms available at the following 
> link: www.barcap.com/emaildisclaimer. By messaging with Barclays you consent 
> to the foregoing.  Barclays Capital is the investment banking division of 
> Barclays Bank PLC, a company registered in England (number 1026167) with its 
> registered of!
 fi!
> ce at 1 Churchill Place, London, E14 5HP.  This email may relate to or be 
> sent from other members of the Barclays Group.
> 
> __
> R-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
> 
> 

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


[Rd] VennDiagram Bugs

2011-03-08 Thread Dario Strbenac
Hello,

Even though the documentation says that it is possible to have a scaled Euler 
diagram for three categories, this fails to happen. All of the circles are the 
same size.

My commands are :

library(VennDiagram)
A <- 1:10
B <- 9:18
C <- 15:500
venn.diagram(list(NameOne=A, NameTwo=B, NameThree=C), "example.tiff", euler.d = 
TRUE, scaled = TRUE, fill = c("red", "blue", "green"), cat.pos = 0)

I also notice that adjusting just one text label with cat.just = list(c(-1, 0), 
c(0, 0), c(0, 0)) actually moves all of them around. Why is that ?

Also, I have some real data I'm working on, where X, Y, Z are vectors of 
numbers. It has an error with an unhelpful error message. Can it be fixed ?

> summary(X)
   Min. 1st Qu.  MedianMean 3rd Qu.Max. 
  1370683408488   13070   17560 
> summary(Y)
   Min. 1st Qu.  MedianMean 3rd Qu.Max. 
219474098159394   13550   17560 
> summary(Z)
   Min. 1st Qu.  MedianMean 3rd Qu.Max. 
   218440766266574979408280 
> venn.diagram(list(A = X, B = Y, C = Z),"crash.tiff")
Error in if (max.x - min.x >= max.y - min.y) { : 
  missing value where TRUE/FALSE needed

> traceback()
5: adjust.venn(grob.list, ...)
4: draw.sp.case(area.list = c(a1, a2, a3, 0, 0, 0, a7), enabled.areas = c(1, 
   2, 3, 7), area.x = c(a1.x.pos, a2.x.pos, a3.x.pos, 0, 0, 
   0, a7.x.pos), area.y = c(a1.y.pos, a2.y.pos, a3.y.pos, 0, 
   0, 0, a7.y.pos), attach.label.to = c(1, 3, 7), x.centres = c(x.centre.1, 
   x.centre.2, x.centre.3), y.centres = c(y.centre.1, y.centre.2, 
   y.centre.3), a.list = c(r1, r2, r3), b.list = c(r1, r2, r3), 
   straight.reverse = TRUE, reverse = reflection, category = category, 
   cat.default.pos = cat.default.pos, lwd = lwd, lty = lty, 
   col = col, label.col = label.col, cex = cex, fontface = fontface, 
   fontfamily = fontfamily, cat.pos = cat.pos, cat.dist = cat.dist, 
   cat.col = cat.col, cat.cex = cat.cex, cat.fontface = cat.fontface, 
   cat.fontfamily = cat.fontfamily, cat.just = cat.just, fill = fill, 
   alpha = alpha, ...)
3: draw.120(a1, a2, a3, a4, a5, a6, a7, category = category, reverse = reverse, 
   cat.default.pos = cat.default.pos, lwd = lwd, lty = lty, 
   col = col, label.col = label.col, cex = cex, fontface = fontface, 
   fontfamily = fontfamily, cat.pos = cat.pos, cat.dist = cat.dist, 
   cat.col = cat.col, cat.cex = cat.cex, cat.fontface = cat.fontface, 
   cat.fontfamily = cat.fontfamily, cat.just = cat.just, cat.prompts = 
cat.prompts, 
   fill = fill, alpha = alpha, ...)
2: draw.triple.venn(length(a), length(b), length(c), length(nab), 
   length(nbc), length(nac), length(nabc), list.names, ind = FALSE, 
   list.order = 1:3, ...)
1: venn.diagram(list(A = X, B = Y, C = Z), "crash.tiff")

My setup is :

> sessionInfo()
R version 2.12.2 (2011-02-25)
Platform: x86_64-pc-mingw32/x64 (64-bit)

locale:
[1] LC_COLLATE=English_Australia.1252  LC_CTYPE=English_Australia.1252
LC_MONETARY=English_Australia.1252 LC_NUMERIC=C   
LC_TIME=English_Australia.1252

attached base packages:
[1] grid  stats graphics  grDevices utils datasets  methods   base  
   

other attached packages:
[1] VennDiagram_1.0.0

--
Dario Strbenac
Research Assistant
Cancer Epigenetics
Garvan Institute of Medical Research
Darlinghurst NSW 2010
Australia

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel