search for: cbind

Displaying 20 results from an estimated 5314 matches for "cbind".

Did you mean: bind
2012 Jul 10
1
cbind and cbind.data.frame
## Hi, I'm having trouble understanding how the cbind function decides what method to apply to its arguments. Easy cut and paste code below. > > > > ## create two columns > c1 <- c("A","A","B","B") > c2 <- 1:4 > > ## cbind outputs a matrix with elements that are characters,...
2003 Jul 29
2
cbind/rbind inconsistency with NULL parameter (PR#3585)
R-Version: 1.7.1 (2003-06-16) OS: Debian/GNU Linux cbind and rbind handle NULL parameters inconsistently. Consider: > cbind() NULL > cbind(NULL) NULL And: > cbind(diag(x = 1, 1, 1)) [,1] [1,] 1 > cbind(NULL, diag(x = 1, 1, 1)) [,1] [1,] 1 These seem to indicate that NULL parameters will be ignored in any...
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...
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 <...
2008 Dec 22
2
... (dotMethods) and cbind/rbind: how to give the signature?
Dear List, I'm struggling with the signature writing cbind/rbind functions for a S4 class. First of all, I'm very happy that it is now possible to dispatch on ... I follow the example for "paste" in ?dotMethods, which works as far as this: ### start example setClass ("cbtest", representation = representation (data = &qu...
1999 Aug 05
6
cbind is not generic as claimed, omits labels where S has them (PR#239)
(1) ?cbind claims The generic functions `cbind' and `rbind' take a sequence of vector and/or matrix arguments and combine them as the columns or rows, respectively, of a matrix. Note: The method dispatching is not done via `UseMethod(..)', but by C-internal dispatching....
2004 Mar 27
2
cbind question
hi, all: Just wonder if there is any suggestions in how to get around this cbind error. I created two character lists with identical length. First tried combine the lists together with cbind, then convert the lists to matrix, and tried again. Both faied. Any fix to merge the two lists/matrices? ll<- multiget(ftID, hgu95av2LOCUSID) > class(ll) [1] "list" > s...
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 methods (see ?cBind) I defined rbind2 and cbind2 instead: setMet...
2011 Nov 10
2
library(qpcR) cbind.na
I want to use function cbind.na at library(qpcR) I install package qpcR and I can use functions such m1 <- pcrfit(reps, 1, 2, l5) > AICc(m1) [1] -102.5843 but when i try cbind.na(1, 1:7) i take message Error: could not find function "cbind.na" Thanks -- View this message in context: http://r.789695....
2006 Jun 06
2
Strange behaviour of cbind
Hi, Is this intended behaviour of cbind? > a<-c(0,1,2,3) > a [1] 0 1 2 3 > a<-as.ordered(a) > a [1] 0 1 2 3 Levels: 0 < 1 < 2 < 3 > a<-a[a!=0] #remove the zero from a > a [1] 1 2 3 Levels: 0 < 1 < 2 < 3 > cbind(a) a [1,] 2 [2,] 3 [3,] 4 #cbind adds +1 to each element > a<-as....
2003 Jul 30
0
cbind/rbind inconsistency with NULL parameter (PR#3595)
The R help for cbind/rbind states: > For `cbind' (`rbind'), vectors of zero length are ignored unless > the result would have zero rows (columns), for S compatibility. > (Zero-extent matrices do not occur in S and are not ignored in R.) I presume this means the S language as defined in...
2015 Jan 26
2
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 rbind, cbind with these defined >> classes. >> >> Since it does not seem to be possible to define rbind and >...
2005 Jul 19
2
using argument names (of indeterminate number) within a function
...are not good enough to state my problem more clearly): I want to write a function with an indeterminate (not pre-defined) number of arguments and think that I should use the "..." construct and the match.call() function. The goal is to write a function that (among other things) uses cbind() to combine a not pre-defined number of vectors specified in the function call. For example, if my vectors are x1, x2, x3, ... xn, within the function I want to use cbind(x1, x2) or cbind(x1, x3, x5) or ... depending on the vector names I use in the funcion call. Additionally, the function has...
2009 Dec 18
2
Getting Rd pages right for redefined S3 generic
I'm writing a package, and would appreciate advice on controlling the help documentation cross-references for a redefined generic. I wanted to define a cbind equivalent for an object that mostly behaves like a data frame. base::cbind dispatches to a data frame method if _any_ parameter is a data frame, so I defined a new S3 cbind and cbind.default to handle dispatch on first object only. Though I confess that redefining cbind leaves me a tad nervous, th...
2013 Jul 23
1
cbind error with check.names
Here is an example where?cbind?fails with an error when?check.names=TRUE?is set. data(airquality) airQualityBind =cbind(airquality,airquality,check.names =TRUE) ?I understand that?cbind?is a call to?data.frame?and the following works: airQualityBind =data.frame(airquality,airquality,check.names =TRUE) but I would like to unde...
2006 Mar 25
1
There were 25 warnings (use warnings() to see them)
...() to see them) > t = table(pred, spi[1251:13500,9]) > t pred 0 1 0 42 40 1 12 22 > classAgreement(t) but I get the warning. The warnings run like this: > warnings() Warning messages: 1: number of rows of result is not a multiple of vector length (arg 2) in: cbind(1, 1:N, predict(object$mtrees[[i]], newdata, type = "class")) 2: number of rows of result is not a multiple of vector length (arg 2) in: cbind(1, 1:N, predict(object$mtrees[[i]], newdata, type = "class")) 3: number of rows of result is not a multiple of vector...
2010 Jul 12
2
cbind in for loops
I have 30 files in the current directories, i would like to perform the cbind(fil1,file2,file3,file4....file30) how could i do this in a for loop: such as: file2 <- list.files(pattern=".out3$") for (j in file2) { cbind(j).......how to implement cbind here } Thanks. -- View this message in context: http://r.789695.n4.nabble.com/c...
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 > 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 nee...
2007 Oct 31
2
cbind()
Hello, I would like to use the cbind() function to construct a matrix used in the middle of a function as following for (i in 1:1000) { b[i] <- function(cbind(a[[1]][[i]], a[[2]][[i]],a[[3]][[i]],...a[[67]][[i]])) } Is there an easy way of achieving this rather than "cbind" every column? -- View this message in conte...
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 > 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...