similar to: ... (dotMethods) and cbind/rbind: how to give the signature?

Displaying 20 results from an estimated 2000 matches similar to: "... (dotMethods) and cbind/rbind: how to give the signature?"

2012 Sep 12
1
methods cbind2 bind_activation disrupts cbind everywhere
The methods package ?cbind2 includes the instruction to use via methods:::bind_activation(TRUE). This changes the default definition of cbind globally, disrupting proper evaluation in packages not using cbind2. Is cbind2 a hold-over from a time when ... could not be used for dispatch? What is a safe way for a package to use cbind2? This came up in the context of complex package dependencies
2015 Jan 24
3
Proper way to define cbind, rbind for s4 classes in package
Hi all, this question has already been posted on stackoverflow, however without success, see also http://stackoverflow.com/questions/27886535/proper-way-to-use-cbind-rbind-with-s4-classes-in-package. I have written a package using S4 classes and would like to use the functions rbind, cbind with these defined classes. Since it does not seem to be possible to define rbind and cbind directly as S4
2015 Jan 26
2
Proper way to define cbind, rbind for s4 classes in package
>>>>> Michael Lawrence <lawrence.michael at gene.com> >>>>> on Sat, 24 Jan 2015 06:39:37 -0800 writes: > On Sat, Jan 24, 2015 at 12:58 AM, Mario Annau > <mario.annau at gmail.com> wrote: >> Hi all, this question has already been posted on >> stackoverflow, however without success, see also >>
2015 Feb 02
2
Proper way to define cbind, rbind for s4 classes in package
>>>>> Michael Lawrence <lawrence.michael at gene.com> >>>>> on Sun, 1 Feb 2015 19:23:06 -0800 writes: > I've implemented the proposed changes in > R-devel. Minimally tested, so please try it. It should > delegate to r/cbind2 when there is at least one S4 > argument and S3 dispatch fails (so you'll probably want to
2015 Feb 09
2
Proper way to define cbind, rbind for s4 classes in package
Are you able to create a reproducible example, somehow? Thanks, Michael On Mon, Feb 9, 2015 at 2:28 PM, Mario Annau <mario.annau at gmail.com> wrote: > Hi Michael, > I've tested your change in r67699 (using r67773) and the function now > correctly dispatches to r/cbind2 within the R-session without > bind_activation(TRUE). However, running unit tests using R CMD check I
2015 Feb 20
1
Proper way to define cbind, rbind for s4 classes in package
>>>>> Mario Annau <mario.annau at gmail.com> >>>>> on Wed, 11 Feb 2015 20:18:53 +0100 writes: > sorry - I just got irritated by my different R-versions. > The behaviour I described in the previous mail was discovered using R > 3.1.2 without bind_activation(TRUE). In r67773 all calls are delegated > to r/cbind.matrix and not
2007 Mar 20
1
cbind() & rbind() for S4 objects -- 'Matrix' package changes
As some of you may have seen / heard in the past, it is not possible to make cbind() and rbind() into proper S4 generic functions, since their first formal argument is '...'. [ BTW: S3-methods for these of course only dispatch on the first argument which is also not really satisfactory in the context of many possible matrix classes.] For this reason, after quite some discussion on
2015 Feb 02
0
Proper way to define cbind, rbind for s4 classes in package
I've implemented the proposed changes in R-devel. Minimally tested, so please try it. It should delegate to r/cbind2 when there is at least one S4 argument and S3 dispatch fails (so you'll probably want to add an S3 method for your class to introduce a conflict, otherwise it will dispatch to cbind.data.frame if one of the args is a data.frame). There may no longer be a need for cBind() and
2015 Jan 24
0
Proper way to define cbind, rbind for s4 classes in package
On Sat, Jan 24, 2015 at 12:58 AM, Mario Annau <mario.annau at gmail.com> wrote: > Hi all, > this question has already been posted on stackoverflow, however without > success, see also > http://stackoverflow.com/questions/27886535/proper-way-to-use-cbind-rbind-with-s4-classes-in-package. > > I have written a package using S4 classes and would like to use the > functions
2015 Feb 09
0
Proper way to define cbind, rbind for s4 classes in package
Hi Michael, I've tested your change in r67699 (using r67773) and the function now correctly dispatches to r/cbind2 within the R-session without bind_activation(TRUE). However, running unit tests using R CMD check I figured out that the same function call delegates to r/cbind.matrix (function uses S4 class as first- and matrix as second argument). Is this a bug and/or how can I get function
2015 Feb 11
0
Proper way to define cbind, rbind for s4 classes in package
sorry - I just got irritated by my different R-versions. The behaviour I described in the previous mail was discovered using R 3.1.2 without bind_activation(TRUE). In r67773 all calls are delegated to r/cbind.matrix and not r/cbind2. As a workaround I have now implemented an S3 method for my S4 class which correctly dispatches for both versions (3.1.2 and r67699+) - see also the commit for the h5
2007 Apr 07
2
Rf_PrintValue problem with methods::show
Hi, I think this is a bug (even though I can't find documentation explicitly saying that it should work). Basically, Rf_PrintValue(obj) fails when 'obj' is an S4 object that should be printed using show() rather than print(). From the error message I'm guessing that the need to use show is detected correctly but then show is not found. "cbind2" in the code below is just
2008 Feb 24
2
Generic Functions
Hi I have some problems in defining new generic functions and classes. Just have a look at the following example: require(fPortfolio) setClass("PROBECLASS", representation( type="character" ) ) isGeneric("setType<-") #Returns TRUE #I would like to define a specific function for
2008 Feb 24
2
Generic Functions
Hi I have some problems in defining new generic functions and classes. Just have a look at the following example: require(fPortfolio) setClass("PROBECLASS", representation( type="character" ) ) isGeneric("setType<-") #Returns TRUE #I would like to define a specific function for
2008 Dec 03
1
reduce limit number of arguments in methods:::cbind
Dear all, As far as I understand, the number of arguments in methods:::cbind is limited by the "self recursive" construction of the function which generates nested loops. A workaround could be to use the internal cbind function on blocks of non S4 objects. The limitation would then be reduced to the number of consecutive S4 objects. ##### R code ##### dfr <- data.frame(matrix(0,
2010 Jul 22
0
sweep / mapply question
Dear list, I have a matrix, spc, that should row-wise be interpolated: E.g. spc <- matrix (1:1e6, ncol = 250, nrow = 4000, byrow = TRUE) spc [1:10, 1:10] shifts <- seq_len (nrow (spc)) wl <- seq_len (ncol (spc)) interpolate <- function (spc.row, shift, wl) spline (wl + shift, spc.row, xout = wl, method = "natural")$y interpolate (spc [1,], shift = shifts [1], wl = wl)
2010 Feb 28
1
dots for sample
Dear R-Developers, could 'sample' gain a ... argument? As a convenience function, I added a sample Method to my hyperSpec class. This function however has a flag indicating whether the results should be returned directly as a hyperSpec object or rather as indices that give a random sample. For the moment, I use SetGeneric to add the dots argument, but this of course gives a warning
2011 Jan 20
4
puzzled with plotmath II
sorry, I forgot my sessionInfo: please see below. -------- Original Message -------- Subject: puzzled with plotmath Date: Thu, 20 Jan 2011 12:48:18 +0100 From: Claudia Beleites <cbeleites at units.it> To: R Help <r-help at r-project.org> Dear all, I'm puzzled with matrix indices in plotmath. I'm plotting matrix elements: Z [i, i], and I'd like to put that as label.
2010 Nov 10
2
force apply not to drop the dimensions of FUN results ?
Dear R users, Here is my problem: I have an array with at least four dimensions: > dim(myArray) [1] 20 17 3 6 I'd like to apply a function to each occurrence of the matrix (3x6) defined by the last two dimensions. This interpolation function always return a matrix of the same dimensions as its argument: > interpSecteurs.f(myArray[1, 1, , ]) secteur rotation 1 2 3
2010 Aug 17
1
prompt () and backticks for default arguments
Dear all, I just noticed, that prompt () looses backticks that protect default arguments: f <- function (FUN = `*`) {} cat (prompt (f, NA)$usage) yields: \usage{ f(FUN = *) } %- maybe also 'usage' for other objects documented here. without the backticks, which is of course found by R CMD check as syntax error. While this is easily fixed if the .Rd is further edited manually, I