我有两个变量“y”和“剂量”,并尝试从这两个变量中确定最大值。但是,当我使用 max(c(y,dose)) 时,它似乎只识别一个变量。同样,当我使用 min() 时,它识别出另一个变量。有谁知道为什么?
谢谢。
> y
[1] "4.3" "4.1" "4.1" "4.1" "4.1" "4.3" "3.8" "4.5" "4" "3.9" "4.3" "3.9"
[13] "4.2" "3.9" "4.3" "3.9" "4" "4" "4.1" "3.5" "3.8" "4" "4.1" "3.9"
[25] "3.9" "4" "4.1" "4.3" "3.7" "4.4"
> dose
[1] "16.03" "16.03" "22.9"
> max(y)
[1] "4.5"
> max(dose)
[1] "22.9"
> max(c(y,dose))
[1] "4.5"