Re: [Rd] is() and S3 classes

2008-06-04 Thread Michael Lawrence
On Wed, Jun 4, 2008 at 8:05 PM, Michael Lawrence <[EMAIL PROTECTED]> wrote: > The is() function begins with the following code: > > cl <- class(object) > if (length(cl) > 1) { > if (is.na(match(cl[[1]], names(getClass("oldClass")@subclasses > > return(class2 %in% cl

[Rd] is() and S3 classes

2008-06-04 Thread Michael Lawrence
The is() function begins with the following code: cl <- class(object) if (length(cl) > 1) { if (is.na(match(cl[[1]], names(getClass("oldClass")@subclasses return(class2 %in% cl) As one can see, it uses S3 inheritance if the first element of the class attribute is a

Re: [Rd] Splus/R typedef for C equivalent of S "integer"

2008-06-04 Thread Bill Dunlap
On Wed, 4 Jun 2008, Prof Brian Ripley wrote: > Bill, > > R's R.h already has > > typedef double Sfloat; > typedef int Sint; > #define SINT_MAX INT_MAX > #define SINT_MIN INT_MIN Whoops, I forgot the name and that I'd put it into Splus's R.h (and now in someing included by it) a while back. Quite

Re: [Rd] Splus/R typedef for C equivalent of S "integer"

2008-06-04 Thread Prof Brian Ripley
Bill, R's R.h already has typedef double Sfloat; typedef int Sint; #define SINT_MAX INT_MAX #define SINT_MIN INT_MIN for this purpose, and it is used in a lot of packages. It goes back a long way, and I don't remember its origins but 'S Programming' is one source. Brian On Wed, 4 Jun 2008,

[Rd] Splus/R typedef for C equivalent of S "integer"

2008-06-04 Thread Bill Dunlap
We've been working on making it easier to write packages that work in both R and Splus. One issue is that R and Splus use different internal representations of integers and this makes a difference on their 64-bit versions: R uses ints (32 bits on 32-bit and 64-bit versions of R) and Splus uses lon

Re: [Rd] RSQLite bug fix for install with icc

2008-06-04 Thread Seth Falcon
Hi Mark, [the r-sig-db list might have been a better spot for this...] * On 2008-06-04 at 14:28 -0400 Mark Kimpel wrote: > I encountered problems installing RSQLite, R-2.7.0, on RHEL4 using > Intel 10.1 icc, My sysadmin helped me track down the problem and > kindly forwarded me the fix, which cor

Re: [Rd] Enter key in data editor bombs program in MDI (PR#11579)

2008-06-04 Thread Duncan Murdoch
On 6/4/2008 9:05 AM, [EMAIL PROTECTED] wrote: Full_Name: Michael H Version: 2.7 Which 2.7? The 2.7.0 release? (sessionInfo() would be more specific.) I see a crash there, but not in R-patched. Please give it a try (it's downloadable from cran.r-project.org/bin/windows/base). Duncan Murd

Re: [Rd] permsn incorrect when x==m (library: prob) (PR#11571)

2008-06-04 Thread G. Jay Kerns
Dear Obby, Thanks. In the future, when you have a question about something that happens in a particular package, keep in mind that it is customary to contact the package maintainer (me), rather than file a bug report with the R developers. In that case, I would have alerted you that this problem

[Rd] Enter key in data editor bombs program in MDI (PR#11579)

2008-06-04 Thread mikehallquist
Full_Name: Michael H Version: 2.7 OS: Windows XP SP3 Submission from: (NULL) (74.74.76.1) When running R with the multiple document interface, pressing enter in the data editor causes the program to crash with the following command: Dataset <- edit(as.data.frame(NULL)) This problem persists whe

[Rd] permsn incorrect when x==m (library: prob) (PR#11571)

2008-06-04 Thread obnoxious_one
Full_Name: Obnoxious Version: 2.7.0 OS: Windows Submission from: (NULL) (121.223.77.238) Objective: Generate all permutations of the elements of x taken m at a time. Library: prob Function: permsn Issue: Does not appear to be working correctly when x==m. Example: libary(prob) permsn(2,1) i

[Rd] An issue happens Embed R and redirt png file

2008-06-04 Thread Rongrong
I am a new R user and I have a question of embedding R to generate png On Debian, I installed R by source code. Now I want to embed R in an application which name is MyApp, and run the following syntax: png(filename="/tmp/Rplot%03d.png) example(rect) dev.off() Unfortunately I get the following

Re: [Rd] significant digits (PR#9682)

2008-06-04 Thread Prof Brian Ripley
That (and simpler, sprintf()) merely tell you about your OS's sprintf function. That is not required to accurately give a decimal representation of more than DECIMAL_DIG digits, and certainly not 50. The help for formatC does warn you about this. On my F8 system DECIMAL_DIG is mentioned in mat

Re: [Rd] savePlot() no longer automatically adds an extension to the filename.

2008-06-04 Thread S Ellison
Apologies; in my last post (below) I should have distinguished between action on the current patch and suggested action for the future. I bow to Duncan on the fate of the current patch, as he's managing it. The suggestions of an extra savePlot parameter or a wrapper function with extension defaul

Re: [Rd] savePlot() no longer automatically adds an extension to the filename.

2008-06-04 Thread S Ellison
>>> Michael Prager <[EMAIL PROTECTED]> 06/04/08 4:28 AM >>> >There is much to be said for consistency (across platforms and >functions) and stability (across versions) in software. I could not agree more. But while consistency is an excellent reason for making the patch consistent across platfor

Re: [Rd] significant digits (PR#9682)

2008-06-04 Thread Karl Ove Hufthammer
Duncan Murdoch: > The number 0.12345 is not exactly representable, but (I think) it is > represented by something slightly closer to 0.1235 than to 0.1234. I like using formatC for checking such things. On my (Linux) system, I get: $ formatC(.12345,digits=50) [1] "0.12345417443857259

Re: [Rd] savePlot() no longer automatically adds an extension to the filename.

2008-06-04 Thread Duncan Murdoch
Gabor Grothendieck wrote: On Tue, Jun 3, 2008 at 10:36 PM, Simon Urbanek <[EMAIL PROTECTED]> wrote: On Jun 3, 2008, at 8:40 PM, Duncan Murdoch wrote: On 03/06/2008 2:35 PM, Mike Prager wrote: "S Ellison" <[EMAIL PROTECTED]> wrote: Plaintive squeak: Why the change? Som

Re: [Rd] savePlot() no longer automatically adds an extension to the filename.

2008-06-04 Thread Duncan Murdoch
Simon Urbanek wrote: On Jun 3, 2008, at 8:40 PM, Duncan Murdoch wrote: On 03/06/2008 2:35 PM, Mike Prager wrote: "S Ellison" <[EMAIL PROTECTED]> wrote: Plaintive squeak: Why the change? Some OS's and desktops use the extension, so forgetting it causes trouble. The new default f

Re: [Rd] savePlot() no longer automatically adds an extension to the filename.

2008-06-04 Thread Michael Prager
If asked, this user would agree with Simon, for the "several reasons" he stated. There is much to be said for consistency (across platforms and functions) and stability (across versions) in software. MHP Simon Urbanek wrote on 6/3/2008 10:36 PM: > > On Jun 3, 2008, at 8:40 PM, Duncan Murdoch w