You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the moment, the functions wt.sig, pwtc, wtc, xwt, wt use sig.test parameter.
The significance test is actually implemented inside wt.sig and the other functions only redirect the parameter at some point in their code.
There are three possible values for the sig.test parameter:
0 = regular chi^2 test
1 = time-average test
2 = scale-average test
Then, inside wt.sig, there is a switch (originally if..elseif..else) that computes the significance depending on the parameter. The switch in R is faster than if..elseif..else and it can either use numeric index as a parameter (indexed from 1) or a string value. The problem with numeric indexes is that there is no "default" value possible inside the switch.
It seems to me that it would be beneficial to change the numeric values 0,1,2 into string values such as "regular", "time", "scale" or similar. This would also make the code more understandable.
It would, however, break the current API.
But maybe just upgrading the version solves the problem.
The text was updated successfully, but these errors were encountered:
At the moment, the functions
wt.sig
,pwtc
,wtc
,xwt
,wt
usesig.test
parameter.The significance test is actually implemented inside
wt.sig
and the other functions only redirect the parameter at some point in their code.There are three possible values for the
sig.test
parameter:Then, inside
wt.sig
, there is a switch (originally if..elseif..else) that computes the significance depending on the parameter. Theswitch
in R is faster thanif..elseif..else
and it can either use numeric index as a parameter (indexed from 1) or a string value. The problem with numeric indexes is that there is no "default" value possible inside the switch.It seems to me that it would be beneficial to change the numeric values 0,1,2 into string values such as "regular", "time", "scale" or similar. This would also make the code more understandable.
It would, however, break the current API.
But maybe just upgrading the version solves the problem.
The text was updated successfully, but these errors were encountered: