[R] Very strange behavior of 'rep'

Izmirlian, Grant (NIH/NCI) [E] |zm|r||g @end|ng |rom m@||@n|h@gov
Thu Aug 15 20:39:45 CEST 2024


\n<<SEND AS PLAIN TEXT!>>\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 <- 5
    n.per.grp*n.tt
    length(rep(0:1, each=n.per.grp*n.tt))
    length(rep(0:1, each=108*5))
>> \n<<Grant Izmirlian grant.izmirlian at nih dot gov>>\n\n\n\n
--please do not edit the information below--

R Version:
 platform = x86_64-pc-linux-gnu
 arch = x86_64
 os = linux-gnu
 system = x86_64, linux-gnu
 status =
 major = 4
 minor = 4.1
 year = 2024
 month = 06
 day = 14
 svn rev = 86737
 language = R
 version.string = R version 4.4.1 (2024-06-14)
 nickname = Race for Your Life

Locale:
 LC_CTYPE=C.UTF-8;LC_NUMERIC=C;LC_TIME=C.UTF-8;LC_COLLATE=C.UTF-8;LC_MONETARY=C.UTF-8;LC_MESSAGES=C.UTF-8;LC_PAPER=C.UTF-8;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=C.UTF-8;LC_IDENTIFICATION=C

Search Path:
 .GlobalEnv, package:lme4, package:Matrix, package:stats,
 package:graphics, package:grDevices, package:utils, package:datasets,
 package:showtext, package:showtextdb, package:sysfonts,
 package:methods, Autoloads, package:base

	[[alternative HTML version deleted]]



More information about the R-help mailing list