'How do I fix this simple R loop error manipulating lists
Basically want to input 2 lists and one is a list of total_values = [41,42,40,37,42,..] and the other list is a list of length the sum of the values in total_values, say 700. Call that list set_values. I want the index of each value in total_values and make a new list to return. So I want the new list to contain set_values[41] as the first value. set_values[41+42] as the second value. And set_values[41+42+43] as the third value using the indexed position from total_values. I have try to do this with a nested for loop to increased through the index of total_values but I have no luck and very frustrated... Please let me know if you have any good advice it would be greatly appreciated!!
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
