Are objects of class 'numeric_version' of class 'numeric' ?
I guess that is the problem...
Best
F.
On 12/20/25 16:34, Gabor Grothendieck wrote:
> versions <- c("9.10", "9.2")
> nv <- numeric_version(versions)
> class(nv)
> ## [1] "numeric_version"
>
> max(nv) # ok
> ## [1] ‘9.10’
>
> versions[tail(order(nv), 1)] # ok
> ## [1] "9.10"
>
> sort(nv, decreasing = TRUE)[1] # ok
> ## [1] ‘9.10’
>
> versions[which.max(xtfrm(nv))] # ok
> ## [1] "9.10"
>
> versions[which.max(nv)] # error
> ## Error in which.max(nv) : 'list' object cannot be coerced to type
> 'double'
>
>
[[alternative HTML version deleted]]
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel