标签:默认 names 最小值 logical number col spec default str
NA:缺失数据
NaN:无意义的数,比如sqrt(-2)
Inf:正无穷大
-Inf:负无穷大
which.min(x) which.max(x) x numeric (logical, integer or double) vector or an R object for which the internal coercion to double works whose min or max is searched for.
max.col(m, ties.method = c("random", "first", "last"))
m numerical matrix ties.method a character string specifying how ties are handled, "random" by default;
通常第一个参数默认是random,如果是first那么就返回相同最大值中第一列,last与此相反。
which(x, arr.ind = FALSE, useNames = TRUE)
arrayInd(ind, .dim, .dimnames = NULL, useNames = FALSE)
which(LETTERS == "R") which(ll <- c(TRUE, FALSE, TRUE, NA, FALSE, FALSE, TRUE)) #> 1 3 7
转自:https://stat.ethz.ch/R-manual/R-devel/library/base/html/which.html
转自:https://stat.ethz.ch/R-manual/R-devel/library/base/html/Extremes.html
max(..., na.rm = FALSE) min(..., na.rm = FALSE) pmax(..., na.rm = FALSE) pmin(..., na.rm = FALSE) pmax.int(..., na.rm = FALSE) pmin.int(..., na.rm = FALSE) ... numeric or character arguments (see Note). na.rm a logical indicating whether missing values should be removed.
用法: min(5:1, pi) #-> one number pmin(5:1, pi) #-> 5 numbers
标签:默认 names 最小值 logical number col spec default str
原文地址:https://www.cnblogs.com/BlueBlueSea/p/9913086.html