Re: [Rd] Dispatch method on S3 or S4 class

2010-09-07 Thread Martin Morgan
On 09/06/2010 10:00 PM, Dario Strbenac wrote: Hello, I've been attempting to make a generic method that dispatches on the first argument, which can be either an S3 or an S4 class. This is as far as I've gotten. Any suggestions about what to try next ? library(aroma.affymetrix)

[Rd] as.character on NaN gives NaN, is that intentional?

2010-09-07 Thread Ulrike Grömping
Dear DevelopeRs, I am surprised about the outcome of the second command: str(as.character(as.numeric(ee))) str(as.character(log(-1))) I would have expected a character NA. Is there an intention behind this behavior? Best, Ulrike -- * *

Re: [Rd] as.character on NaN gives NaN, is that intentional?

2010-09-07 Thread Kevin R. Coombes
It seems to me that preserving information about the kind of number (or not) present would be useful. I rather like the fact that as.numeric(as.character(NaN)) and as.numeric(as.character(Inf)) both work as the identity operator on numeric-like objects. (In this context, note that both

[Rd] Is an R sub-session somehow possible?

2010-09-07 Thread ghostwheel
I wrote the interface between R and TeXmacs. Recently, I added tab completion. However, there is one slight problem. In order to enable easy interaction with R, I (I.e. my program) interact with the command-line interface. This means that the user can invoke demo(), and then R will interact with

[Rd] what is the best way for an external interface to interact with graphics, libraries

2010-09-07 Thread ghostwheel
Another message about the R to TeXmacs interface. 1. Graphics The TeXmacs interface allows the user to directly insert graphics into the session. Since I am not very familiar with programming for R, I implemented the interaction with graphics in a very primitive way. It was two modes of

Re: [Rd] Is an R sub-session somehow possible?

2010-09-07 Thread Simon Urbanek
On Sep 7, 2010, at 2:06 PM, ghostwheel wrote: I wrote the interface between R and TeXmacs. Recently, I added tab completion. However, there is one slight problem. In order to enable easy interaction with R, I (I.e. my program) interact with the command-line interface. This means that the

Re: [Rd] what is the best way for an external interface to interact with graphics, libraries

2010-09-07 Thread Simon Urbanek
On Sep 7, 2010, at 2:21 PM, ghostwheel wrote: Another message about the R to TeXmacs interface. 1. Graphics The TeXmacs interface allows the user to directly insert graphics into the session. Since I am not very familiar with programming for R, I implemented the interaction with

Re: [Rd] Is an R sub-session somehow possible?

2010-09-07 Thread ghostwheel
Simon Urbanek wrote: On Sep 7, 2010, at 2:06 PM, ghostwheel wrote: a-c(3,4 and then R will respond with '+'. The problem is this: the way I implemented tab completion is calling an R function that creates the completion. But, while in the middle of user input, I can't call a

Re: [Rd] what is the best way for an external interface to interact with graphics, libraries

2010-09-07 Thread ghostwheel
Simon Urbanek wrote: I don't know the mechanics of the actual inserting in TeXmac but it would be trivial to simply create a copy of the plot as EPS (or whatever is needed) at the time of insertion. See dev.copy2eps() for a function that does exactly that. Great. It works much

Re: [Rd] as.character on NaN gives NaN, is that intentional?

2010-09-07 Thread Ulrike Grömping
Kevin, I wouldn't mind NaN (although it seems a bit strange, because you wouldn't expect a character to be a number), but I find it strange to get the character string NaN. is.na(as.character(NaN)) returns FALSE, which is what I dislike. Best, Ulrike Kevin R. Coombes schrieb: It seems to

Re: [Rd] what is the best way for an external interface to interact with graphics, libraries

2010-09-07 Thread Simon Urbanek
On Sep 7, 2010, at 3:07 PM, ghostwheel wrote: Simon Urbanek wrote: I don't know the mechanics of the actual inserting in TeXmac but it would be trivial to simply create a copy of the plot as EPS (or whatever is needed) at the time of insertion. See dev.copy2eps() for a function that

Re: [Rd] as.character on NaN gives NaN, is that intentional?

2010-09-07 Thread Wolfgang Huber
Hi Ulrike any set of three people will probably have five different opinions on this, but I can see that this makes sense: NA - not available, not measured, not recorded NaN - result of an arithmetic computation that lies outside of the real numbers; in that sense, available. However,

Re: [Rd] Is an R sub-session somehow possible?

2010-09-07 Thread ghostwheel
Simon Urbanek wrote: It doesn't really matter where the R is as long as you have some way of getting at the results. You are still leaving us in the dark as of what exactly you do (technically) so there is not much detail we can provide... Sorry, I'll try to provide more detail: I

Re: [Rd] How to add a slot to S4 class of an existing package?

2010-09-07 Thread Kasper Daniel Hansen
Seb That thread and the resources in Biobase assumes that you have a class that extends Versioned. Doing so will help you in the long run by providing you with updateObject (at the cost of some complexity). However, it does not really help you if the existing class does not extend Versioned. In

Re: [Rd] what is the best way for an external interface to interact with graphics, libraries

2010-09-07 Thread Paul Murrell
Hi On 8/09/2010 9:23 a.m., Simon Urbanek wrote: On Sep 7, 2010, at 3:07 PM, ghostwheel wrote: Simon Urbanek wrote: I don't know the mechanics of the actual inserting in TeXmac but it would be trivial to simply create a copy of the plot as EPS (or whatever is needed) at the time of

[Rd] Correction to vec-subset speed patch

2010-09-07 Thread Radford Neal
I found a bug in one of the fourteen speed patches I posted, namely in patch-vec-subset. I've fixed this (I now see one does need to duplicate index vectors sometimes, though one can avoid it most of the time). I also split this patch in two, since it really has two different and independent