Re: [Rd] add Rvsnprintf to API ??

2005-05-14 Thread Prof Brian Ripley
On Fri, 13 May 2005, Charles Geyer wrote:
Could Rvsnprintf (in src/main/errors.c) be added to the R API
with prototype in include/R_ext/Print.h say?
Here's my problem.  I'm trying to write some code that is not
totally tied to R.  Hence I want R style error messaging to
be isolated in a small module.  I do not want #include R.h
and calls to error (Rf_error) in most of my code.
Hence I want to write a module with something like
- begin code snippet -
#include stdarg.h
#include stdio.h
#include R.h
#define BUFSIZE 1024
void die(const char *format, ...)
{
   char buf[BUFSIZE];
   va_list arg;
   va_start(arg, format);
   vsnprintf(buf, BUFSIZE, format, arg);
   va_end(arg);
   buf[BUFSIZE - 1] = '\0';
   error(buf);
}
- end code snippet -
But that's not portable because vsnprintf isn't.
You've already made a big effort to work around nonportability of
vsnprintf, but don't make it available in the API.  Why not?
If I could change vsnprintf to Rvsnprintf above, then I wouldn't
have to do some horrible autoconf song and dance that probably wouldn't
be completely portable anyway.
Or is there a better solution I haven't seen?
R guarantees to have *vsnprintf* available.  Putting things in the API is 
a one-way decision and ties our hands for ever.  Rvsnprintf is not even 
exported from errors.c: it is static and just a convenience wrapper.

About all a user package needs to do is
AC_CHECK_DECLS([vsnprintf])
and in your code snippet
#if defined(HAVE_DECL_VSNPRINTF)  !HAVE_DECL_VSNPRINTF
extern int vsnprintf (char *str, size_t count, const char *fmt, va_list arg);
#endif
However, AFAIK all known R platforms do have vsnprintf these days: the 
MinGW compiler used on Windows gained it within the last year.

--
Brian D. Ripley,  [EMAIL PROTECTED]
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@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] Bug in axis labels (PR#7860)

2005-05-14 Thread Duncan Murdoch
This is fixed now, in R-patched and R-devel.
Duncan Murdoch
[EMAIL PROTECTED] wrote:
Bob O'hara wrote:
I'm a bit reluctant to call anything a bug: I know it's usually my 
incompetence instead.  In this case, I can't see what else it is, 
although it may be a bug in Windows.

The problem comes from trying to create a .png of a figure in Windows 
XP, with R2.1.0.  On the screen it looks OK, but in the .png the text 
for the x label is smaller than for the y label.  The problem seems to 
be created by using axes=F in plot().  Here's some code to demonstrate 
the problem:

XX=1:5;  YY=1:5
png(thing.png)
par(mfrow=c(2,1))
plot(XX, YY, axes=F, xlab=X label, ylab=Y label)
plot(XX, YY, xlab=X label, ylab=Y label)
dev.off()
I get a similar problem with bmp() and jpeg(), but not postscript() or 
pdf().  If I draw the figure in the window in R and then save it as a 
.png from the menu, the png looks fine.

Everything works fine in R1.5.1 (I know, I know!) on Debian Linux, which 
is why I'm reporting this as a Windows problem.

I see the problem in the first figure, and it's still there in a recent 
r-devel build.  My test was also on Windows. Since png() uses the 
Windows graphics driver, it does look like an R bug in the Windows 
graphics driver, but I'd like to hear from someone on a different 
platform...

Duncan Murdoch
__
R-devel@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
__
R-devel@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


[Rd] PR$7706, png device plot on athlon 64 processor

2005-05-14 Thread Duncan Murdoch
A later bug report (#7860) had to do with inappropriate sizing of the 
first text drawn on a png() device, and I've now fixed the bug that 
caused that.  Could you please check whether you still see your bug on 
today's build?  It will be available on CRAN tomorrow (May 15), in

http://cran.r-project.org/bin/windows/base/rpatched.html
Thanks!
Duncan Murdoch

From: [EMAIL PROTECTED]
Subject: png device plot on athlon 64 processor
Date: Fri, 25 Feb 2005 15:52:40 +0100 (CET)
Full_Name: Emiel Ver Loren van Themaat
Version: 2.0.1
OS: windows XP
Submission from: (NULL) (145.117.31.248)
On our computers, which have windows xp sp2 installed and have a 64 bit
amd/athlon processor, the following simple code
png(test.png)
plot(1:10,main=hello)
dev.off()
results in a plot in which the main title is not visible at all. For 32-bit
computers with XP sp2 this bug does not occur. 

Hopefully this bug can be fixed.
(may be the png library is not up to date)
__
R-devel@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


[Rd] Re: [CSL #263000] Verbrechen der deutschen Frau

2005-05-14 Thread lab

Greetings.  (This is an automated response.  There is no need to reply.)

Your message regarding:
  Verbrechen der deutschen Frau
has been received and assigned a request number of 263000.

In order help us track the progress of this request, we ask that you
note the following:

1) Please save this email -- it contains the tracking number for this request.

2) include the string:
  [CSL #263000]
   (exactly as it appears -- with the square brackets) in the Subject: line
   of any further mail about this particular request.

   For example:
  Subject: [CSL #263000] Verbrechen der deutschen Frau

   You may do this simply by replying to this email.

3) Please make sure to include [EMAIL PROTECTED] as a recipient for any future 
   email about this topic (To: [EMAIL PROTECTED] or Cc: [EMAIL PROTECTED])

For your convenience, a copy of your original mail is at the end of
this message.

Thank You,
Computer Systems Lab

==
From [EMAIL PROTECTED] Sat May 14 22:09:21 2005
Received: from granite.cs.wisc.edu (granite.cs.wisc.edu [128.105.6.24]) by
 vampire.cs.wisc.edu (8.13.1/8.13.1) with ESMTP id j4F39Lk4012966 for
 [EMAIL PROTECTED]; Sat, 14 May 2005 22:09:21 -0500
Received: from atykiwxox.org (gdd87.gdd.macalester.edu [141.140.121.87])
 by granite.cs.wisc.edu (8.13.1/8.13.1) with SMTP id j4F39EAT005207;
 Sat, 14 May 2005 22:09:15 -0500
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Date: Sun, 15 May 2005 03:08:58 UTC
Subject: [CSL #263000] Verbrechen der deutschen Frau
Importance: Normal
X-Mailer: Outlook 7.43
X-Priority: 3 (Normal)
MIME-Version: 1.0
Message-ID: [EMAIL PROTECTED]
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=us-ascii
X-CSL-Mailscanner-Information: Please contact [EMAIL PROTECTED] for more
 information
X-CSL-Mailscanner: Found to be clean

Lese selbst:
http://www.jn-bw.de/texte/zeitgeschichte/verbrechen_der_frau.htm

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


[Rd] Specifying dependency on a specific patched version

2005-05-14 Thread Gabor Grothendieck
Is there a way to specify a package dependency in the Depends:
field of the DESCRIPTION file for a specific patched version of a 
specific OS?

For example, today's Windows patched release (2005-05-14) has
the capability of changing the time zone within R on Windows
via Sys.putenv(TZ=GMT) but prior patched versions do not have this.
Is there some way of ensuring that the 2005-05-14 or later release is used
if on Windows only?

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


[Rd] Re: Calling R functions from Java

2005-05-14 Thread D0c
Hey anyone explored how to pass java objects (e.g Vector or String) to
R as a to be converted to a data.frame?

On 4/29/05, D0c [EMAIL PROTECTED] wrote:
 Hey guys,
 I got a java gui app which loads up data into a table. How can i use R
 to perform statistical functions on the data in the table?
 
 P.S My question is not particularly geared towards Java coding, but
 more towards allowing R functionality within Java.


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