search for: rbind2

Displaying 20 results from an estimated 23 matches for "rbind2".

Did you mean: rbind
2015 Jan 24
3
Proper way to define cbind, rbind for s4 classes in package
...s/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 methods (see ?cBind) I defined rbind2 and cbind2 instead: setMethod("rbind2", signature(x="ClassA", y = "ANY"), function(x, y) { # Do stuff ... }) setMethod("cbind2", signature(x="ClassA", y = "ANY"), function(x, y) { # Do stuff ... }) >From ?cbind2 I...
2015 Jan 26
2
Proper way to define cbind, rbind for s4 classes in package
...ritten 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 methods (see ?cBind) I defined >> rbind2 and cbind2 instead: >> > This needs some clarification. It certainly is possible to > define cbind and rbind methods. The BiocGenerics package > defines generics for those and many methods are defined by > e.g. S4Vectors, IRanges, etc. The issue is that disp...
2007 Mar 20
1
cbind() & rbind() for S4 objects -- 'Matrix' package changes
...f 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 R-core (and maybe a bit on R-devel) about the options, since R-2.2.0 we have had S4 generic functions cbind2() and rbind2() (and default methods) in R's "methods" which are a version of cbind() and rbind() respectively for two arguments (x,y) {and fixed 'deparse.level = 0' : the argument names are 'x' and 'y' and hence don't make sense to be used to construct column-names o...
2016 May 10
1
recursion problem using do.call(rbind, list(..,<S4>,..))
...methods:::cbind and ...:rbind functions}: If you read ?rbind carefully, you may have learned that rbind() and cbind() are able to deal with S4 "matrix-like" objects, via the hidden methods:::rbind / methods:::cbind functions where these recursively build on appropriate S4 methods for rbind2() / cbind2(). That is how cbind() and rbind() work nowadays for Matrix-package matrices. However, there is problem lurking from the above paragraph, and for experienced programmers / computer scientists that may even be obvious: recursion. A simple MRE (minimal reproducible example) for the prob...
2006 Dec 19
1
preserving sparse matrices (Matrix)
Hi, I have sparse (tridiagonal) matrices, and I use the Matrix package for handling them. For certain computations, I need to either set the first row to zero, or double the last row. I find that neither operation preserves sparsity, eg > m <- Diagonal(5) > m 5 x 5 diagonal matrix of class "ddiMatrix" [,1] [,2] [,3] [,4] [,5] [1,] 1 . . . . [2,] . 1
2015 Feb 02
2
Proper way to define cbind, rbind for s4 classes in package
...gt; 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 methods (see ?cBind) I >> defined >> rbind2 and cbind2 instead: >> >> >> >> > This needs some clarification. It certainly is possible >> to > define cbind and rbind methods. The BiocGenerics >> package > defines generics for those and many methods are >> defined by &...
2015 Feb 09
2
Proper way to define cbind, rbind for s4 classes in package
...d with these > > >> defined >> classes. > > >> >> > > >> >> Since it does not seem to be possible to define rbind > > >> and >> cbind directly as S4 methods (see ?cBind) I > > >> defined >> rbind2 and cbind2 instead: > > >> >> > > >> > > >> > This needs some clarification. It certainly is possible > > >> to > define cbind and rbind methods. The BiocGenerics > > >> package > defines generics for tho...
2015 Feb 20
1
Proper way to define cbind, rbind for s4 classes in package
...n the mean time there have been a few off-list e-mails, {"No, using an S3 method was definitely not the idea of Michael's changes!" .. } and many hours of work by me. R-devel svn rev 67852 and later now has cbind() / rbind() working in a better way, dipatching to either cbind2(), rbind2() S4 methods for "your" classes, or to S4 rbind() or cbind() methods for your classes. Notably the new code now should create column / rownames analogously to base::cbind / rbind, influenced by deparse.level in the case of non-matrix arguments. Small changes in some outputs may occur, n...
2015 Feb 02
0
Proper way to define cbind, rbind for s4 classes in package
...sses 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 methods (see ?cBind) I defined > >> rbind2 and cbind2 instead: > >> > > > This needs some clarification. It certainly is possible to > > define cbind and rbind methods. The BiocGenerics package > > defines generics for those and many methods are defined by > > e.g. S4Vectors, IRanges,...
2015 Jan 24
0
Proper way to define cbind, rbind for s4 classes in package
...-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 methods (see ?cBind) I defined rbind2 and cbind2 instead: > This needs some clarification. It certainly is possible to define cbind and rbind methods. The BiocGenerics package defines generics for those and many methods are defined by e.g. S4Vectors, IRanges, etc. The issue is that dispatch on "..." is singular, i.e., you...
2015 Feb 09
0
Proper way to define cbind, rbind for s4 classes in package
...the functions rbind, cbind with these > >> defined >> classes. > >> >> > >> >> Since it does not seem to be possible to define rbind > >> and >> cbind directly as S4 methods (see ?cBind) I > >> defined >> rbind2 and cbind2 instead: > >> >> > >> > >> > This needs some clarification. It certainly is possible > >> to > define cbind and rbind methods. The BiocGenerics > >> package > defines generics for those and many methods are...
2006 Sep 07
2
Matrix package in R-2.4.0alpha
....source = keep.source) : in 'Matrix' methods specified for export, but none defined: BIC, anova, coef, confint, deviance, fitted, fixef, formula, head, lmer, logLik, mcmcsamp, plot, qqmath, ranef, residuals, resid, simulate, summary, tail, terms, update, vcov, VarCorr, with, cbind2, rbind2, Arith, Math, Math2, Summary, Compare, !, +, %*%, Schur, as.array, as.matrix, as.vector, band, chol, colMeans, colSums, coerce, crossprod, determinant, diag, dim, dimnames, dimnames<-, expand, expm, kronecker, image, isSymmetric, norm, rcond, rowMeans, rowSums, show, solve, t, tcrossprod, tril,...
2015 Feb 11
0
Proper way to define cbind, rbind for s4 classes in package
...> >> defined >> classes. > > >> >> > > >> >> Since it does not seem to be possible to define rbind > > >> and >> cbind directly as S4 methods (see ?cBind) I > > >> defined >> rbind2 and cbind2 instead: > > >> >> > > >> > > >> > This needs some clarification. It certainly is possible > > >> to > define cbind and rbind methods. The BiocGenerics > > >> package > defi...
2018 Mar 22
0
[R-pkg-devel] Warning: rBind is deprecated
...e been deprecated, unfortunately *not* with a warning [which was a lapsus of mine]. The help page for these has started, for a long time now, as | cBind package:Matrix R Documentation | | Versions of 'cbind' and 'rbind' recursively built on cbind2/rbind2 | | Description: | | The base functions ?cbind? and ?rbind? are defined for an | arbitrary number of arguments and hence have the first formal | argument ?...?. For that reason, in the past S4 methods could | easily be defined for binding together matrices inheriting from |...
2009 Sep 29
2
rbind for a list
Dear All, I´m using the following code: all1<-gg2[[1]][[1]]; for(i in 1:48){ all1 <- rbind(all1,gg2[[i]][[1]]) } to create a new matrix that contains all the matrices in a list called gg2. gg2 is a list that looks like >> gg2 [[1]] [[1]][[1]] <matrix one> [[2]] [[2]][[1]] <matrix two> . . . [[48]] [[48]][[1]] <matrix 48> Is there a faster way to do the rbind?
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
2007 Jun 19
0
Augment 'Matrix' matrices
...rk". But because it was a hack, and some people called it "horrible" rather than "sophisticated", we had to give it up. {well, the really compelling argument was an example of do.call(rbind, <list of length 1000>) which was *very* inefficient} Instead, cbind2() and rbind2() have been written a few R versions ago to be used as (S4) generic functions. --> help(cbind2) In 'Matrix', we also define cBind() and rBind() to be used as direct (n-argument) substitutes for cbind() or rbind(), respectively. Martin
2011 Jun 16
0
lmer: How to plot a spline from function
...the time-spline, and I just can't find out how to do this. I also tried a gamm4 and a amer function, but I think they can't handle all the NA-values in the dataset as I always get error messages when I put all the variables into the model ("Matrices must have same number of columns in rbind2(..1, r)"). I'd be really thankful if someone could help me on this topic... Best regards, Caro -- View this message in context: http://r.789695.n4.nabble.com/lmer-How-to-plot-a-spline-from-function-tp3603083p3603083.html Sent from the R help mailing list archive at Nabble.com.
2019 Sep 27
0
missing imports not detected by 'R CMD check' (?)
...ry to import all we need, but not more > importFrom("methods" > ## still needed {group generics needed to be explicitly imported} ? > , Ops, Arith, Compare, Logic, Math, Math2, Summary, Complex > ## generics for which we export new methods: > , cbind2, rbind2, coerce, show > , kronecker > ## things we call,.. necessary when Matrix is loaded, but not attached, as in > ## Rscript --vanilla -e 'require(methods);(M <- Matrix::Matrix(0:1,3,3)); as(M,"sparseMatrix")' > , as, is, extends, new >...
2010 Jan 10
1
lme4 and function 'cholmod_start' not provided by package 'Matrix' / Ubuntu
...lass Virtual Class "atomicVector" of Atomic Vectors band Extract bands of a matrix bdiag Construct a Block Diagonal Matrix cBind Versions of 'cbind' and 'rbind' recursively built on cbind2/rbind2 chol Choleski Decomposition - 'Matrix' S4 Generic colSums Form Row and Column Sums and Means compMatrix-class Class "compMatrix" of Composite (Factorizable) Matrices ....