partial match argument warning/error
Closed this issue · 4 comments
LiNk-NY commented
Hi Alan, @alanocallaghan
It looks like plotColData
is using a partial argument $val
instead of the full name $value
or even better [["value"]]
.
To reproduce, you can set the option options(warn = 2L)
or add the options in the chunk below.
Here is the error:
> options(warn = 2L)
> suppressPackageStartupMessages({
+ library(TENxPBMCData)
+ library(scater)
+ })
> sce <- TENxPBMCData("pbmc3k")
snapshotDate(): 2023-04-04
see ?TENxPBMCData and browseVignettes('TENxPBMCData') for documentation
loading from cache
> sce$nCounts <- colSums(counts(sce))
> plotColData(sce, "nCounts")
Error in y_by_out$val :
(converted from warning) partial match of 'val' to 'value'
FWIW, I keep these options in my ~/.Rprofile
for good practice:
options(
warnPartialMatchAttr = TRUE,
warnPartialMatchDollar = TRUE,
warnPartialMatchArgs = TRUE
)
see here for reference
https://kevinushey.github.io/blog/2015/02/02/rprofile-essentials/
Best,
Marcel
alanocallaghan commented
Thanks, sorry for the delay as I'm on leave but will fix this next week
LiNk-NY commented
No worries. Thanks Alan @alanocallaghan
alanocallaghan commented
I tried adding this to the test suite but I just get an avalanche of warnings from (eg) ggplot2, pheatmap using partial matching internally
LiNk-NY commented
Thanks Alan!