Às 06:40 de 11/12/2025, Henrik Bengtsson escreveu:
What's going on here:
$ R --vanilla --quiet
f <- function(n) rep("x", times = n)
f()
[1] "x"
?
getRversion()
[1] ‘4.5.2’
/Henrik
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Hello,
I can reproduce this on Windows.
Microsoft Windows [Version 10.0.22631.5039]
(c) Microsoft Corporation. Todos os direitos reservados.
C:\>R --vanilla --quiet
> f <- function(n) rep("x", times = n)
> f
function(n) rep("x", times = n)
> f()
[1] "x"
> getRversion()
[1] '4.5.2'
> g <- function(n) rep(1, times = n)
> g
function(n) rep(1, times = n)
> g()
[1] 1
> h <- function(n) rep(1, n)
> h
function(n) rep(1, n)
> h()
[1] 1
> i <- function(n) rep(1, each = n)
> i()
[1] 1
> sessionInfo()
R version 4.5.2 (2025-10-31 ucrt)
Platform: x86_64-w64-mingw32/x64
Running under: Windows 11 x64 (build 22631)
Matrix products: default
LAPACK version 3.12.1
locale:
[1] LC_COLLATE=Portuguese_Portugal.utf8 LC_CTYPE=Portuguese_Portugal.utf8
[3] LC_MONETARY=Portuguese_Portugal.utf8 LC_NUMERIC=C
[5] LC_TIME=Portuguese_Portugal.utf8
time zone: Europe/Lisbon
tzcode source: internal
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_4.5.2 tools_4.5.2
> q()
Hope this helps,
Rui Barradas
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel