I have a data frame like this:
symbol ls1 lsp10 ls02 ls6
a "" gh "" ""
a "" "" "" ""
b "" "" gh ""
df "" "" "" lm
b gh "" "" ""
how can I convert this to below table:
symbol ls1 lsp10 ls02 ls6
a "" gh gh ""
b gh "" gh ""
df "" "" "" lm
I tried below code but didn't worked
result <- aggregate(. ~ symbol, data = df, paste)