【发布时间】:2014-04-22 07:49:10
【问题描述】:
我的数据框是这样的:
> mydata
time id product
1 201301 1 apple
2 201302 1 htc
3 201302 1 apple
4 201302 2 htc
5 201302 2 apple
如何得到以下结果?
> result
time id product
1 201301 1 apple
2 201302 1 apple&htc
3 201302 2 apple&htc
我试过ddply()function 这样的:
ddply(mydata,.(time,id),summarise,paste0(product,"&",product))
但这并没有达到我的预期。感谢您的回答。
我的意思是,如何在 SAP HANA DATABASE 中的 SQL 中实现?非常感谢!
【问题讨论】: