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
After updating to R 4.0, post_summ() (and other functions) return a warning about condition having length > 1 and only the first element will be used. This issue occurs on postpack version 0.2.3 (at least).
data(cjs, package="postpack")
post_summ(cjs, "b")
Returns the output as expected, but also throws these warnings:
Warning messages:
1: In if (class(post_mat) == "numeric") { :
the condition has length > 1 and only the first element will be used
2: In if (class(post_mat_sub) == "numeric") { :
the condition has length > 1 and only the first element will be used
3: In if (class(post_mat_sub) == "numeric") { :
the condition has length > 1 and only the first element will be used
The text was updated successfully, but these errors were encountered:
After further digging, I've discovered that this is a result of the class() function call, which originates in matrix2mcmclist(). Evidently, now when you run:
m=matrix(c(1,1,1,1), 2, 2)
class(m)
You will get "matrix" "array". When this result is passed to if(), it will produce the warnings above. This behavior is documented in the R 4.0.0 release notes under "Significant User-Visible Changes" (bullet 2).
This will take a little bit of fixing to make sure the if() statements only respond to one logical element throughout all functions.
After updating to R 4.0,
post_summ()
(and other functions) return a warning about condition having length > 1 and only the first element will be used. This issue occurs on postpack version 0.2.3 (at least).Returns the output as expected, but also throws these warnings:
The text was updated successfully, but these errors were encountered: