search for: rbinding

Displaying 20 results from an estimated 3371 matches for "rbinding".

Did you mean: binding
2008 Nov 25
2
dots methods: dispatch issues
There seems to be a bug arising when using multiple S4 generics with "..." as the signature. The following code works as expected: ############################################################## > setGeneric("rbind", function(..., deparse.level=1) standardGeneric("rbind"), + signature = "...") Creating a generic for "rbind" in
2013 Apr 29
3
rbinding some elements from a list and obtain another list
Hi everybody, I have a list, where every element of this list is a data frame. An example: Mylist<-list(A=data.frame, B=data.frame, C=data.frame, D=data.frame) I want to rbind some elements of this list. As an example: Output<-list(AB=data.frame, CD=data.frame) Where AB=rbind(A,B) CD=rbind(C,D) I’ve tried: f<-function(x){ for (i in
2005 Apr 29
0
handling of zero and negative indices in src/main/subscript.c:mat2indsub() (PR#7824)
This message contains a description of what looks like a bug, examples of the suspect behavior, a proposed change to the C code to change this behavior, example of behavior with the fix, and suggestions for 3 places to update the documentation to reflect the proposed behavior. It is submitted for consideration for inclusion in R. Comments are requested. Currently, the code for subscripting
2019 May 26
2
rbind has confusing result for custom sub-class (possible bug?)
Debugging this issue: https://github.com/Rdatatable/data.table/issues/2008 We have custom class 'IDate' which inherits from 'Date' (it just forces integer storage for efficiency, hence, I). The concatenation done by rbind, however, breaks this and returns a double: library(data.table) DF = data.frame(date = as.IDate(Sys.Date())) storage.mode(rbind(DF, DF)$date) # [1]
2012 Feb 16
2
how to rbind matrices from different loops
Dear R experts, I am having difficulty using loops productively and would like to please ask for advice. I have a dataframe of ids and groups. I would like to break down the dataframe into groups, find the unique sets of ids, then reassemble. My thought was to use a loop, but I have been unable to finish this loop in a logical way. I would like to find the unique ids for group 1, group 2,
2005 May 06
0
(PR#7824) handling of zero and negative indices in
I've put this in (with some different wording). Although S blithely accepts mis-dimensioned index matrices I agree this is wrong and have made it an error. On Fri, 29 Apr 2005 tplate@acm.org wrote: > This message contains a description of what looks like a bug, examples > of the suspect behavior, a proposed change to the C code to change this > behavior, example of behavior with
2010 Oct 26
1
S4 methods for rbind()
Hello. I am trying to write an S4 method for rbind(). I have a class of objects called 'mdm', and I want to be able to rbind() them to one another. I do not want the method for rbind() to coerce anything to an mdm object. I want rbind(x1,x2,x1,x2) to work as expected [ie rbind() should take any number of arguments]. This is what I have so far: setGeneric(".rbind_pair",
2005 Jan 21
6
how to use do.call("rbind", get(list(mlist)))
I have around 200 data frames I want to rbind in a vectorized way. The object names are: m302 m303 ... m500 So I tried: mlist <- paste("m",302:500,sep="") dat <- do.call("rbind", get(list(mlist))) and I get "Error in get(x, envir, mode, inherits) : invalid first argument" I know "rbind" is valid because dat <- rbind(m302, m303,
2019 May 26
2
rbind has confusing result for custom sub-class (possible bug?)
On Sun, May 26, 2019 at 4:06 AM Michael Chirico <michaelchirico4 at gmail.com> wrote: > > Have finally managed to come up with a fix after checking out sys.calls() > from within the as.Date.IDate debugger, which shows something like: > > [[1]] rbind(DF, DF) > [[2]] rbind(deparse.level, ...) > [[3]] `[<-`(`*tmp*`, ri, value = 18042L) > [[4]] `[<-.Date`(`*tmp*`,
2010 Mar 15
1
rbind, data.frame, classes
Hi, This has bugged me for a bit. First question is how to keep classes with rbind, and second question is how to properly return vecotrs instead of lists after turning an rbind of lists into a data.frame list1=list(a=2, b=as.Date("20090102", format="%Y%m%d")) list2=list(a=2, b=as.Date("20090102", format="%Y%m%d")) rbind(list1, list2) #this loses the
2005 Apr 15
1
treatment of zero and negative elements in matrix indices
Matrix indexing seems to give rather "variable" results when zeros or negative values are included among the indices (in terms of both error messages and in terms of the number of returned values when there is no error message). Is this the intended behavior? I couldn't see any comments about zeros or negative values in matrix indices in either ?"[" or Section 3.4.2
2007 Jul 17
2
poor rbind performance
Hi I rbind data frames in a loop in a cumulative way and the performance detriorates very quickly. My code looks like this: for( k in 1:N) { filename <- paste("/tmp/myData_",as.character(k),".txt",sep="") myDataTmp <- read.table(filename,header=TRUE,sep=",") if( k == 1) { myData <- myDataTmp } else{ myData
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
2017 Jan 17
2
bug in rbind?
I suspect there may be a bug in base::rbind.data.frame Below there is minimal example of the problem: m <- matrix (1:12, 3) dfm <- data.frame (c = 1 : 3, m = I (m)) str (dfm) m.names <- m rownames (m.names) <- letters [1:3] dfm.names <- data.frame (c = 1 : 3, m = I (m.names)) str (dfm.names) rbind (m, m.names) rbind (m.names, m) rbind (dfm, dfm.names) #not working rbind
2019 May 27
2
rbind has confusing result for custom sub-class (possible bug?)
Yes, thanks for following up on thread here. And thanks again for clearing things up, your email was a finger snap of clarity on the whole issue. I'll add that actually it was data.table's code at fault on the storage conversion -- note that if you use an arbitrary sub-class 'foo' with no methods defined, it'll stay integer. That's because [<- calls as.Date and then
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
2003 Apr 21
3
index after rbind
I am using rbind to concatenate two dataframes, but after the rbind I get a strange "double" index. I am using rbind a number of times to make one large dataset. Is there a way to prevent the "double" index? Or is there some other way to concatenate the data (it looks like merge only works by columns)? Here is an example of the "double" index.
2019 Jun 02
1
rbind has confusing result for custom sub-class (possible bug?)
I thought it would be good to summarize my thoughts, since I made a few hypotheses that turned out to be false. This isn't a bug in base R, in either rbind() or `[<-.Date`. To summarize the root cause: base::rbind.data.frame() calls `[<-` for each column of the data.frame, and there is no `[<-.IDate` method to ensure the replacement value is converted to integer. And, in fact,
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 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