【发布时间】:2014-12-18 12:44:03
【问题描述】:
如何将属性分配给变量?例如。
> x <- rpart(f.la, mydata)
分配属性:
$names
[1] "frame" "where"
[3] "call" "terms"
[5] "cptable" "method"
[7] "parms" "control"
[9] "functions" "numresp"
[11] "splits" "variable.importance"
[13] "y" "ordered"
$xlevels
named list()
$ylevels
[1] "cancelled" "cart-abandon" "purchased" "returned"
$class
[1] "rpart"
像这样,我想为变量创建属性并为该属性赋值。
【问题讨论】:
标签: r attributes