Unlisting columns by groups

后端 未结 4 1768
天命终不由人
天命终不由人 2020-12-03 15:55

I have a dataframe in the following format:

id | name               | logs                                  
---+--------------------+-----------------------         


        
4条回答
  •  一整个雨季
    2020-12-03 16:39

    Just to show another option

    library(data.table)
    setDT(df)[, .(logs = unlist(logs)), by = .(id, name)]
    

提交回复
热议问题