qvalue density function error
1
0
Entering edit mode
Tim • 0
@47994544
Last seen 7 hours ago
Australia

I'm trying to run the following function

qval <- qvalue(DE.object$p.value[, 2], fdr.level = 0.05) 

And I get this error:
Error in density(x, adjust = adj) : unused argument (adjust = adj)

Can anyone help? Would be greatly appreciated

Thanks!

> sessionInfo()
R version 4.4.1 (2024-06-14 ucrt)
Platform: x86_64-w64-mingw32/x64
Running under: Windows 11 x64 (build 22631)
qvalue • 53 views
ADD COMMENT
0
Entering edit mode
@james-w-macdonald-5106
Last seen 2 hours ago
United States

It's likely that stats::density.default got masked by a package that you loaded, and now the masking density function is being called, and it doesn't have an 'adjust' argument. You will get messages when functions are masked by package loading. As an example, here is what happens when I load dplyr

> library(dplyr)

Attaching package: 'dplyr'

The following objects are masked from 'package:stats':

    filter, lag

The following objects are masked from 'package:base':

    intersect, setdiff,
    setequal, union

And now if I try to use base::union without using the qualified name, I will get dplyr::union instead. If qvalue called stats::density directly it wouldn't be a problem, but it's not super common IME for people to write code that includes the qualified name for every function used (I sure don't do that...).

Login before adding your answer.

Traffic: 675 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6