0
我獲得了R和不知道這個列表中的對象我怎樣才能將它傳遞到規模使用縮放對象
str(ss)
chr [1:11600, 1:2] "1_1" "1_2" "1_3" "1_4" "1_5" "1_6" "1_7" "1_8" "1_9" "1_10" "1_11" "1_12" "1_13" "1_14" "1_15" ...
- attr(*, "dimnames")=List of 2
..$ : chr [1:11600] "features" "features" "features" "features" ...
..$ : chr [1:2] "driver_trip" "prob"
> ss[1:10,]
driver_trip prob
features "1_1" "0.0438400073093713"
features "1_2" "0.0750898149841077"
features "1_3" "0.108603234710245"
features "1_4" "0.110244641673752"
features "1_5" "0.114281674309826"
features "1_6" "0.114693039193982"
features "1_7" "0.11141782609152"
features "1_8" "0.102231988595076"
features "1_9" "0.1145982975793"
features "1_10" "0.112394651156342"
>
我嘗試介於0概率比例& 1與中心0.5
> ss.prob2<-scale(ss[,2],center=0.5)
Error in FUN(x, aperm(array(STATS, dims[perm]), order(perm)), ...) :
non-numeric argument to binary operator