error in R code: Error in fit_avlr(...), : wn incorrectly formatted
Using avar (CRAN link).
ax_av = fit_avlr(qn = NULL, wn = 1:12, rw = NULL, dr = NULL, my_imu_wv$dataobj[[4]]$variance, my_imu_wv$dataobj[[4]]$scales)
I get this error:
Error in fit_avlr(qn = NULL, wn = 1:12, rw = NULL, dr = NULL, (my_imu_wv$dataobj[[1]]$variance), : wn incorrectly formatted
How can I solve it?
• 955 views
•
link
1 answer
I quickly googled the source code of that function, and the error is triggered by this condition:
if(length(wn) < 1 || !is.whole(wn) || min(wn) < 1 || max(wn) > length(ad)){
stop("wn incorrectly formatted.")
}
If the vector is instantiated correctly (try c(1:12) for additional clarity), then it must be the condition max(wn) > length(ad) that is not fulfilled.
• 0 views
•
link
Log in to answer this question.
Look, before you keep posting these sorts of questions and might gross of users, please read and follow [[ Please read before posting a question ::: How To Ask A Good Question ]] and other posting guides. One needs to know what you're talking about. Just code is not enough. Context, data, package names, make a reproducible example. biostars is not meant to guide you through individual steps. Learn R basics first.
If this is about this tool from your previous questions and see whether they have a guided tutorial.