I have columns that I know the name there and that their data is 0 and 1.
I would like to combine them into one, but if there is 1 in one line, take one value or if I have 1 and 1, save 1.
Sample data:
stockI stockII
1 0
1 0
0 0
0 0
0 0
0 0
0 0
1 0
0 0
1 1
The conclusion I could expect:
stockI/stockII
0
1
0
0
0
0
0
0
0
1
Is there any way cbindto do this?
source
share