當前位置: 首頁>>編程示例 >>用法及示例精選 >>正文


R probably levels.class_pred 提取class_pred級別

class_pred 對象的級別不包含模棱兩可的值。

用法

# S3 method for class_pred
levels(x)

參數

x

class_pred 對象。

例子


x <- class_pred(factor(1:5), which = 1)

# notice that even though `1` is not in the `class_pred` vector, the
# level remains from the original factor
levels(x)
#> [1] "1" "2" "3" "4" "5"

源代碼:R/class-pred.R

相關用法


注:本文由純淨天空篩選整理自Max Kuhn等大神的英文原創作品 Extract class_pred levels。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。