error in R code: Error in fit_avlr(...), : wn incorrectly formatted
1
0
Entering edit mode
7 months ago
snajafy • 0

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?

R • 457 views
ADD COMMENT
1
Entering edit mode

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.

ADD REPLY
0
Entering edit mode
7 months ago

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.

ADD COMMENT

Login before adding your answer.

Traffic: 1965 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