I have two lists. One is a list that only defines an instrument name. The second is the running total of that instrument. There are multiple entries in the instrument name list that are the same. I have a Hash that aggregates/prints the final number of the running total for each instrument in the instrument list. I am trying to print the new totals for only the insrtuments that have changed, and specifically print the change quantity, if that is at all possible, from a given point. For example, I would like to find the changes in instruments from the positionFile only after a certain line and print only the last change amount. This is basically a change in inventory fetcher that prints only the changes in inventory from a given point. Any help at all to accomplish this would be incredible. I am having trouble getting the starting point to reference as well as how to reference the last inventory count before the new running total is printed, among many other things. I am working in R and the instrument list and running total(positionList) come from a single file called positionFile. The lists are:
library(hash)
instrumentList = positionFile[,2]
positionList = positionFile[,3]
posHash = hash(instrumentList,positionList)