Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in evaluating the argument 'x' #141

Open
xueweic opened this issue Mar 13, 2024 · 3 comments
Open

Error in evaluating the argument 'x' #141

xueweic opened this issue Mar 13, 2024 · 3 comments

Comments

@xueweic
Copy link

xueweic commented Mar 13, 2024

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

@pcarbo
Copy link
Collaborator

pcarbo commented Mar 13, 2024

@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)))

@pcarbo
Copy link
Collaborator

pcarbo commented Mar 13, 2024

(Apologies that the error message is not more helpful.)

@xueweic
Copy link
Author

xueweic commented Mar 13, 2024

@pcarbo Thanks Peter, drop(z) solve the issue. z is an matrix-like vector with dimension of P by 1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants