na versão R 4.4.2 (2024-10-31) -- "Pile of Leaves", último macos
$ R --vanilla
> load(file="tttdf")
> str(ttt)
'data.frame': 3 obs. of 17 variables:
$ .mn.r : num 0 0 0
$ .sd.r : num 0 0 0
$ .mn.g : num 0 0 0
$ .sd.g : num 0 0 0
$ .cor.r.g : num 1 1 1
$ sep : num -1 -1 -1
$ beta.g.ldp : num 0 0 0
$ beta.dp.ldp: num 1 1 1
$ beta.r.ldp : num 0 0 0
$ sep : num -2 -2 -2
$ lastdpr : num -3 -5 -6
$ declinedpr : num 0 2 3
$ sep : num -3 -3 -3
$ beta.r.lr : num 0 0 0
$ beta.g.lg : num 0 0 0
$ beta.g.lr : num 0 0 0
$ beta.r.lg : num 0 0 0
ttt <- within(ttt, hello <- 22)
Error in `[<-.data.frame`(`*tmp*`, nl, value = list(hello = 22, .mn.r = c(0, :
duplicate subscripts for columns
> ## make it work
> xxx <- ttt[,1:ncol(ttt)]
> xxx <- within(xxx, hello <- 22)
Não tenho ideia do que pode estar causando isso. É por isso que não posso encurtar o exemplo, também --- por exemplo, removendo colunas.