similar to: cbind/rbind inconsistency with NULL parameter (PR#3585)

Displaying 20 results from an estimated 20000 matches similar to: "cbind/rbind inconsistency with NULL parameter (PR#3585)"

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 the Blue Book ("The ^New S Language", Becker Chambers & Wilks,
2008 Nov 16
1
inconsistency between timeSeries and zoo causing a problem with rbind
Dear R Users and maintainers of packages zoo and timeSeries, I believe there is a recently introduced inconsistency between timeSeries and zoo which is causing a problem with rbind. I had previously reported that I was having problems with rbind in the following code: library(zoo) foo<-zoo(1,order.by=as.Date("2007-10-09")) bar<-zoo(2,order.by=as.Date("2007-10-10"))
1999 Nov 24
1
rbind invisible return value (PR#343)
An assignment in an argument sometimes makes rbind return invisibly > rbind(diag(3),a<-1:3) > print(rbind(diag(3),a<-1:3)) [,1] [,2] [,3] [1,] 1 0 0 [2,] 0 1 0 [3,] 0 0 1 [4,] 1 2 3 > version _ platform sparc-sun-solaris2.7 arch sparc os solaris2.7
2013 Jan 02
2
rbind: inconsistent behaviour with empty data frames?
The rbind on empty and nonempty data frames behaves inconsistently. I am not sure if by design. In the first example, first row is deleted, which may or may not be on purpose: df1 <- data.frame() df2 <- data.frame(foo=c(1, 2), bar=c("a", "b")) rbind(df1, df2) foo bar 2 2 b Now if we continue: df1 <- data.frame(matrix(0, 0, 2)) names(df1) <- names(df2)
2011 Aug 10
1
rbind/cbind
Dear list, I wonder if there a better way to have rbind/cbind/append to create the first element (if it is empty) instead of doing the following in a loop? for (i in 1:10) { if (i == 1) { aRow = SomeExpression(i) } else { aRow = rbind(aRow,SomeExpression(i)) } } Thanks Anthony
2006 Sep 27
1
S3 methods for cbind/rbind
I created a type of object similar to a data frame. In some circumstances, It needs special methods for "[" and "[<-" and rbind() (but not cbind()). Then I found this in the cbind()/rbind() man page: The method dispatching is _not_ done via 'UseMethod()', but by C-internal dispatching. Therefore, there is no need for, e.g., 'rbind.default'.
2005 Aug 22
1
cbind and rbind
Hi, I have been trying for a while to use cbind and rbind to add a row and column to the same table but seem to be able only to add one OR the other??? Any help would be most welcome, Tony Evans Australia [[alternative HTML version deleted]]
2011 Feb 06
1
Applying 'cbind/rbind' among different list object
Hi, I am wondering whether we can apply 'cbind/rbind' on many **equivalent** list objects. For example please consider following: > list1 <- list2 <- vector("list", length=2); names(list1) <- names(list2) <- c("a", "b") > list1[[1]] <- matrix(1:25, 5) > list1[[2]] <- matrix(2:26, 5) > list2[[1]] <- 10:14 > list2[[2]] <-
2013 Jan 22
1
c(), rbind and cbind functions - why type of resulting object is double
Hello Everyone, I am using R 2.15.0 and I came across this behaviour and I was wondering why I don't get an integer vector or and integer matrix with the following code: > z <- c(1, 2:0, 3, 4:8) > typeof(z) [1] "double" > z <- rbind(1, 2:0, 3, 4:8) Warning message: In rbind(1, 2:0, 3, 4:8) : number of columns of result is not a multiple of vector length (arg
2009 Oct 02
2
how to fill out the empty spots when using rbind or cbind?
I have uneven vectors I want to use cbind or rbind to combine them into a matrix. Is there a way to make it so that R would not return error msg saying they're uneven? Thanks. Edward Chen Email: tkedch@msn.com Cell Phone: 510-371-4717 [[alternative HTML version deleted]]
2005 Oct 21
1
Generalised rbind/cbind
Dear list, Is there a generalised form of rbind/cbind for combining matrices/arrays into higher-D structures? ie. if I have: a <- matrix(2,2,2) b <- matrix(3,2,2) how can I get array(rep(c(3,2), each=4), c(2,2,2)) ? It seems like this would be the job of a generalised abind function: abind(a,b, along=1) == rbind(a,b) abind(a,b, along=2) == cbind(a,b) abind(a,b, along=3)
2007 Jun 21
1
what is "better" when combining data frames? merge vs. rbind & cbind
I often need to "combine" data frames, sometimes "vertically" and other times "horizontally". When it "better" to use merge? When is it better to use rbind or cbind? Are there clear pros and cons of each approach? --------------------------------- [[alternative HTML version deleted]]
2008 Mar 13
2
How to cbind or rbind different lengths vectors/arrays without repeating the elements of the shorter vectors/arrays ?
Hi, How to cbind or rbind different lengths vectors/arrays without repeating the elements of the shorter vectors/arrays ? > cbind(1:2, 1:10) [,1] [,2] [1,] 1 1 [2,] 2 2 [3,] 1 3 [4,] 2 4 [5,] 1 5 [6,] 2 6 [7,] 1 7 [8,] 2 8 [9,] 1 9 [10,] 2 10 [[alternative HTML version deleted]]
2004 Mar 26
4
cbind/rbind fail on matrixes containing lists (PR#6702)
Today's R 1.9.0 beta: > m1 [,1] [,2] [,3] [,4] [1,] NA NA NA NA [2,] NA NA NA NA [3,] NA NA NA NA [4,] NA NA NA NA > class(m1[1,1]) [1] "list" > cbind(m1,m1) Error in cbind(...) : cannot create a matrix from these types > rbind(m1,m1) Error in rbind(...) : cannot create a matrix from these types > version _
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
2016 May 10
1
recursion problem using do.call(rbind, list(..,<S4>,..))
This was originally a bug report about Matrix, https://r-forge.r-project.org/tracker/?func=detail&atid=294&aid=6325&group_id=61 but the bug is rather a "design" bug in R, or a limitation. This e-mail is a report of the status quo as I see it, and call for comments, sugguests, help/hints for workarounds, or even a suggestion for a programming task helping R core to amend
2011 Jul 04
1
[R-SIG-Finance] FinCenter in timeSeries with "merge", "cbind" and "rbind"
Hi R users: When I try to merge or bind (cbind or rbind) two series, both with a "FinCenter" different that GMT, the result is "GMT" not the original financial center? What am I doing wrong? ###################################################### require(timeSeries) getRmetricsOptions("myFinCenter") setRmetricsOptions(myFinCenter = "America/Bogota")
2002 Apr 05
1
rbind(NULL,NULL)
In the time honored spirit of wishing to do nothing well, could I suggest that the Splus (versions 5 and 6) response to: > rbind(NULL,NULL) NULL is preferable to the R response: > rbind(NULL,NULL) Error in rbind(NULL, NULL) : attempt to set an attribute on NULL This is on: platform sparc-sun-solaris2.8 arch sparc os solaris2.8 system sparc, solaris2.8 status major 1
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
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 = "data.frame"),