Turning a dataframe into a named vector

前端 未结 2 1059
野的像风
野的像风 2021-01-22 15:08

I applied a model (wordscore) on my dfm. As a result I got an object of output whose class is \"textmodel_wordscores\" \"textmodel\" \"list\". I am interested in the output \"wo

2条回答
  •  长情又很酷
    2021-01-22 15:32

    You can do:

    with(df, setNames(Score, Words))
    
    commitment   progress  implement   decision    message    deficit 
    -0.9843452 -0.9831530 -0.9785868 -0.9777243 -0.9762919 -0.9752300 
    

提交回复
热议问题