ashr
ashr copied to clipboard
Error in evaluating the argument 'x'
Hi there,
Hope everything is well. I met an issue when I run ash
function with input z
. Here, z is a P by 1 vector of z-score. Do you have any idea for this error? Thank you.
ashr::ash( z, rep(1,length(z)),mixcompdist = "normal" )
Error in h(simpleError(msg, call)) : error in evaluating the argument 'x' in selecting a method for function 't': error in evaluating the argument 'x' in selecting a method for function 't': non-conformable arrays
ashr::ash( z, rep(1,length(z)) )
Error in h(simpleError(msg, call)) : error in evaluating the argument 'x' in selecting a method for function 't': argument is not a matrix
@xueweic The likely issue is that z
is not a vector. If it is a matrix something like this should work:
res <- ash(drop(z), rep(1,length(z)))
(Apologies that the error message is not more helpful.)
@pcarbo Thanks Peter, drop(z) solve the issue. z is an matrix-like vector with dimension of P by 1.