Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个值矩阵,其中一些是-Inf。如何找到大于-Inf 的最小值?
这边走:
foo <- matrix(c(1,2,-Inf,3),nrow=2,ncol=2) min(foo[foo>-Inf]) [1] 1
min( foo[ is.finite(foo) ] #...