I do have many sequences which consists 0,1 and it is imported into R as character. The seq looks like as below:
'1000000000000000000010000100''1000000000001000000010100100''0001010100010000110000010000''0011010100010000100000010000''0101000100010000100100011010''0001000100010000101000010011''0101000100010000100000011010''0001000100010000101000010011''0101000100010100100000011010''0101000100010000100000011010''0001000101010000101000010011''0001000100010001100001010010''0011010100010010100000010000''0001000100010000101000010011''0011010100010000100000010000''0001100110110000100000010000''1000001000000000000010000100''0011010100010000100000010000''1000001000000000000010000100''0011010100010000100000010000'
I do have more than 10000 rows. I should write a loop, which operates like subtract from each other randomly, by using these sequences. For example: The first and second row's subtraction equals 2 (3(sum('1000000000000000000010000100')) - 5(sum('1000000000001000000010100100')) = -2). I should add the 0,1 of an each sequence and then should find difference of them. This is iterative process, for example if the sequence number was 20, i should write a loop runs 10*19^20, is very huge, even though it is only 20. Is it even possible to write it in r? and what would be the most efficient loop? and i cannot even subtract my sequences, because of character. I have tried some functions of r, but could not even succeed. Could someone else help me on it?