Re: [R] Very strange behavior of 'rep'

2024-08-15 Thread Duncan Murdoch
I also can't reproduce this. I'd guess that one of your values of n.per.grp or n.tt only prints as the values you showed, but is actually a little smaller. For example, n.per.grp <- 108 - 1.e-14 n.per.grp #> [1] 108 n.tt <- 5 n.per.grp*n.tt #> [1] 540 length(rep(0:1, each=n.per.grp*n.tt)) #>

Re: [R] Very strange behavior of 'rep'

2024-08-15 Thread Rui Barradas
Às 19:39 de 15/08/2024, Izmirlian, Grant (NIH/NCI) [E] via R-help escreveu: \n<>\n\n \n<< This is very weird. I was running a swarm job on the cluster and it bombed only for n.per.grp=108, not for the other values. Even though n.per.grp*n.tt is 540, so that the length of the call to 'rep' should

[R] Very strange behavior of 'rep'

2024-08-15 Thread Izmirlian, Grant (NIH/NCI) [E] via R-help
\n<>\n\n \n<< This is very weird. I was running a swarm job on the cluster and it bombed only for n.per.grp=108, not for the other values. Even though n.per.grp*n.tt is 540, so that the length of the call to 'rep' should be 1080, I'm getting a vector of length 1078. n.per.grp <- 108 n.tt <-