Closed HenrikBengtsson closed 2 years ago
There's also a few seq(..., len = <n>)
and seq(..., length = <n>)
that should be seq(..., length.out = <n>)
:
$ grep -E "seq[(].*len *=" R/*.R
R/arrow3d.R: phi <- seq(pi/nbarbs, 2*pi-pi/nbarbs, len = nbarbs)
R/cylinder3d.R: theta <- seq(0, 2*pi, len=sides+1)[-1]
R/persp3d.R:function(x = seq(0, 1, len = nrow(z)), y = seq(0, 1, len = ncol(z)),
R/persp3d.R: x <- seq(0, 1, len = nrow(z))
R/turn3d.R: theta <- seq(0, 2*pi, len = n + 1)[-(n + 1)]
$ grep -E "seq[(].*length *=" R/*.R
R/material.R: alpha = if (idata[11]) ddata[seq(from=6, length=idata[11])] else 1,
Thanks for pointing those out. There's also at least one more: bg3d()
sets fog=TRUE
, intending it to be treated as a material property, but it partially matches the fogScale
argument in rgl.bg
. So that was a real bug, which I'll fix at the same time as the others.
Thanks for this.
Thanks for pointing those out. There's also at least one more:
bg3d()
setsfog=TRUE
, intending it to be treated as a material property, but it partially matches thefogScale
argument inrgl.bg
. So that was a real bug, which I'll fix at the same time as the others.
I did indeed also see a partial argument warning about fog = TRUE
when running some rayshader examples, but I got distracted and decided to postpone tracking down the exact source. I would have thought it was short for fogScale
. I'm glad you caught a real bug this way. This is exactly why I run with options(warnPartialMatchArgs = TRUE)
and report upstream whenever I see something. In 99.99% of the cases, they're innocent warnings, but once in a while, there's something real. I wish there was an options(errPartialMatchArgs = TRUE)
, especially something that could be enabled by R CMD check
.
Hi Duncan,
I run R with
options(warnPartialMatchArgs = TRUE)
set and spotted some partial argument names in rgl. Specifically, rgl usesrep(<x>, len = <n>)
, which is short ofrep(<x>, length.out = <n>)
in:This is with: