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'


-- 
Statistics & Software Consulting
GKX Group, GKX Associates Inc.
tel: 1-877-GKX-GROUP
email: ggrothendieck at gmail.com

______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Reply via email to