Re: [R] inadverted reordering of a df column when it is copied to another df

2017-03-17 Thread William Dunlap via R-help
But note that m:n does not always produce an integer sequence. It does when the output can be accurately represented as an integer sequence, it does not care if the inputs were integer or numeric. > class( (2^31-10):(2^31-2) ) [1] "integer" > class( (2^31-10):(2^31) ) # biggest integer is as

Re: [R] inadverted reordering of a df column when it is copied to another df

2017-03-17 Thread Rui Barradas
Hello, Not an answer to the OP's statement, but > class(1L:4L) [1] "integer" > class(1:4) [1] "integer" When using m:n there's no need for mL or nL. Rui Barradas Em 17-03-2017 16:58, Jeff Newmiller escreveu: Reprex confirming Bert: A <- data.frame( y = 1L:4L ) B <- data.frame(

Re: [R] inadverted reordering of a df column when it is copied to another df

2017-03-17 Thread Jeff Newmiller
Reprex confirming Bert: A <- data.frame( y = 1L:4L ) B <- data.frame( x = 1L:4L ) A$x <- B$x plot(B$x) #' ![](http://i.imgur.com/cXSFsBh.png) Care to demonstrate for us, Karl? https://cran.r-project.org/web/packages/reprex/README.html On Fri, 17 Mar 2017, Bert Gunter wrote: You are

Re: [R] inadverted reordering of a df column when it is copied to another df

2017-03-17 Thread Thierry Onkelinx
Dear Karl, This is hard to investigate without a reproducible example. Best regards, ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek / Research Institute for Nature and Forest team Biometrie & Kwaliteitszorg / team Biometrics & Quality Assurance Kliniekstraat 25 1070 Anderlecht Belgiu

Re: [R] inadverted reordering of a df column when it is copied to another df

2017-03-17 Thread Bert Gunter
You are wrong. No reordering occurs. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Fri, Mar 17, 2017 at 8:05 AM, Karl Schilling wrote: > Dea

[R] inadverted reordering of a df column when it is copied to another df

2017-03-17 Thread Karl Schilling
Dear all: I have two data.frames A and B of the same number of rows (about 40,000). I realized that when I copy column x from data.frame A to B, the order of this column gets changed. This seems to affect only values in rownumbers > ~ 35/36,000. It also happens in any of the following three