title: Retrieving column and row indices for non-zero values from a list of xts
body: <p>I have data that looks like:</p>
  
  <pre><code> [[1]]
   KRW.LOW.1
  2014-08-08        NA
  2014-08-11        -1
  2014-08-12        -1
  2014-08-13        -1
  2014-08-14        -1
  
  [[2]]
  MYR.LOW.1
  2014-08-08        NA
  2014-08-11        -1
  2014-08-12        -1
  2014-08-13        0
  2014-08-14        0
  </code></pre>
  
  <p>These are simply 'signals'. I'm trying to retrieve both the list index and the row index where there are non-zero entries. For instance, from the above example I would want to save [[1]][2],[[1]][3]...[[2]][2], [[2]][3] so that I can use these indices (or signals) to call corresponding values from my raw data.  </p>
  
  <p>I don't know what the best way to do this would be. I was thinking of a for() function, but then I realized that this would result in the single bracket indice not matching with the double bracket indice. Suggestions would be greatly appreciated. </p>
  
  <pre><code>list(structure(c(0, 0, -1, 0, 1), .indexCLASS = c("POSIXct", 
  "POSIXt"), .indexTZ = "", tclass = c("POSIXct", "POSIXt"), tzone = "CST6CDT", class = c("xts", 
  "zoo"), index = structure(c(1487311200, 1487570400, 1487656800, 
  1487743200, 1487829600), tzone = "CST6CDT", tclass = c("POSIXct", 
  "POSIXt")), .Dim = c(5L, 1L), .Dimnames = list(NULL, "EUR.CLOSE")), 
      structure(c(-1, 0, 1, 0, -1), .indexCLASS = c("POSIXct", 
      "POSIXt"), .indexTZ = "", tclass = c("POSIXct", "POSIXt"), tzone = "CST6CDT", class = c("xts", 
      "zoo"), index = structure(c(1487311200, 1487570400, 1487656800, 
      1487743200, 1487829600), tzone = "CST6CDT", tclass = c("POSIXct", 
      "POSIXt")), .Dim = c(5L, 1L), .Dimnames = list(NULL, "JPY.CLOSE")), 
      structure(c(-1, 0, 0, 0, 1), .indexCLASS = c("POSIXct", "POSIXt"
      ), .indexTZ = "", tclass = c("POSIXct", "POSIXt"), tzone = "CST6CDT", class = c("xts", 
      "zoo"), index = structure(c(1487311200, 1487570400, 1487656800, 
      1487743200, 1487829600), tzone = "CST6CDT", tclass = c("POSIXct", 
      "POSIXt")), .Dim = c(5L, 1L), .Dimnames = list(NULL, "GBP.CLOSE")), 
      structure(c(0, 0, 1, 0, -1), .indexCLASS = c("POSIXct", "POSIXt"
      ), .indexTZ = "", tclass = c("POSIXct", "POSIXt"), tzone = "CST6CDT", class = c("xts", 
      "zoo"), index = structure(c(1487311200, 1487570400, 1487656800, 
      1487743200, 1487829600), tzone = "CST6CDT", tclass = c("POSIXct", 
      "POSIXt")), .Dim = c(5L, 1L), .Dimnames = list(NULL, "CHF.OPEN")), 
      structure(c(-1, 0, 0, 1, 0), .indexCLASS = c("POSIXct", "POSIXt"
      ), .indexTZ = "", tclass = c("POSIXct", "POSIXt"), tzone = "CST6CDT", class = c("xts", 
      "zoo"), index = structure(c(1487311200, 1487570400, 1487656800, 
      1487743200, 1487829600), tzone = "CST6CDT", tclass = c("POSIXct", 
      "POSIXt")), .Dim = c(5L, 1L), .Dimnames = list(NULL, "AUD.CLOSE")), 
      structure(c(1, 0, 1, 0, -1), .indexCLASS = c("POSIXct", "POSIXt"
      ), .indexTZ = "", tclass = c("POSIXct", "POSIXt"), tzone = "CST6CDT", class = c("xts", 
      "zoo"), index = structure(c(1487311200, 1487570400, 1487656800, 
      1487743200, 1487829600), tzone = "CST6CDT", tclass = c("POSIXct", 
      "POSIXt")), .Dim = c(5L, 1L), .Dimnames = list(NULL, "CAD.CLOSE")), 
      structure(c(-1, 0, -1, 0, 1), .indexCLASS = c("POSIXct", 
      "POSIXt"), .indexTZ = "", tclass = c("POSIXct", "POSIXt"), tzone = "CST6CDT", class = c("xts", 
      "zoo"), index = structure(c(1487311200, 1487570400, 1487656800, 
      1487743200, 1487829600), tzone = "CST6CDT", tclass = c("POSIXct", 
      "POSIXt")), .Dim = c(5L, 1L), .Dimnames = list(NULL, "NZD.CLOSE")), 
      structure(c(0, 1, 1, 0, 0), .indexCLASS = c("POSIXct", "POSIXt"
      ), .indexTZ = "", tclass = c("POSIXct", "POSIXt"), tzone = "CST6CDT", class = c("xts", 
      "zoo"), index = structure(c(1487311200, 1487570400, 1487656800, 
      1487743200, 1487829600), tzone = "CST6CDT", tclass = c("POSIXct", 
      "POSIXt")), .Dim = c(5L, 1L), .Dimnames = list(NULL, "SEK.OPEN")), 
      structure(c(0, 0, 1, 0, 0), .indexCLASS = c("POSIXct", "POSIXt"
      ), .indexTZ = "", tclass = c("POSIXct", "POSIXt"), tzone = "CST6CDT", class = c("xts", 
      "zoo"), index = structure(c(1487311200, 1487570400, 1487656800, 
      1487743200, 1487829600), tzone = "CST6CDT", tclass = c("POSIXct", 
      "POSIXt")), .Dim = c(5L, 1L), .Dimnames = list(NULL, "NOK.CLOSE")), 
      structure(c(0, 0, 1, 0, -1), .indexCLASS = c("POSIXct", "POSIXt"
      ), .indexTZ = "", tclass = c("POSIXct", "POSIXt"), tzone = "CST6CDT", class = c("xts", 
      "zoo"), index = structure(c(1487311200, 1487570400, 1487656800, 
      1487743200, 1487829600), tzone = "CST6CDT", tclass = c("POSIXct", 
      "POSIXt")), .Dim = c(5L, 1L), .Dimnames = list(NULL, "CZK.CLOSE")), 
      structure(c(0, 0, 1, 0, 0), .indexCLASS = c("POSIXct", "POSIXt"
      ), .indexTZ = "", tclass = c("POSIXct", "POSIXt"), tzone = "CST6CDT", class = c("xts", 
      "zoo"), index = structure(c(1487311200, 1487570400, 1487656800, 
      1487743200, 1487829600), tzone = "CST6CDT", tclass = c("POSIXct", 
      "POSIXt")), .Dim = c(5L, 1L), .Dimnames = list(NULL, "HUF.LOW.1")), 
      structure(c(-1, 0, 0, 0, 0), .indexCLASS = c("POSIXct", "POSIXt"
      ), .indexTZ = "", tclass = c("POSIXct", "POSIXt"), tzone = "CST6CDT", class = c("xts", 
      "zoo"), index = structure(c(1487311200, 1487570400, 1487656800, 
      1487743200, 1487829600), tzone = "CST6CDT", tclass = c("POSIXct", 
      "POSIXt")), .Dim = c(5L, 1L), .Dimnames = list(NULL, "ILS.LOW.1")), 
      structure(c(1, 0, 0, 0, 0), .indexCLASS = c("POSIXct", "POSIXt"
      ), .indexTZ = "", tclass = c("POSIXct", "POSIXt"), tzone = "CST6CDT", class = c("xts", 
      "zoo"), index = structure(c(1487311200, 1487570400, 1487656800, 
      1487743200, 1487829600), tzone = "CST6CDT", tclass = c("POSIXct", 
      "POSIXt")), .Dim = c(5L, 1L), .Dimnames = list(NULL, "PLN.LOW.1")), 
      structure(c(0, 1, 0, -1, 1), .indexCLASS = c("POSIXct", "POSIXt"
      ), .indexTZ = "", tclass = c("POSIXct", "POSIXt"), tzone = "CST6CDT", class = c("xts", 
      "zoo"), index = structure(c(1487224800, 1487311200, 1487570400, 
      1487656800, 1487743200), tzone = "CST6CDT", tclass = c("POSIXct", 
      "POSIXt")), .Dim = c(5L, 1L), .Dimnames = list(NULL, "RUB.LOW.1")), 
      structure(c(-1, -1, 0, -1, -1), .indexCLASS = c("POSIXct", 
      "POSIXt"), .indexTZ = "", tclass = c("POSIXct", "POSIXt"), tzone = "CST6CDT", class = c("xts", 
      "zoo"), index = structure(c(1487311200, 1487570400, 1487656800, 
      1487743200, 1487829600), tzone = "CST6CDT", tclass = c("POSIXct", 
      "POSIXt")), .Dim = c(5L, 1L), .Dimnames = list(NULL, "TRY.HIGH.1")), 
      structure(c(0, 0, 0, -1, -1), .indexCLASS = c("POSIXct", 
      "POSIXt"), .indexTZ = "", tclass = c("POSIXct", "POSIXt"), tzone = "CST6CDT", class = c("xts", 
      "zoo"), index = structure(c(1487311200, 1487570400, 1487656800, 
      1487743200, 1487829600), tzone = "CST6CDT", tclass = c("POSIXct", 
      "POSIXt")), .Dim = c(5L, 1L), .Dimnames = list(NULL, "ZAR.LOW.1")), 
      structure(c(1, 0, 0, -1, -1), .indexCLASS = c("POSIXct", 
      "POSIXt"), .indexTZ = "", tclass = c("POSIXct", "POSIXt"), tzone = "CST6CDT", class = c("xts", 
      "zoo"), index = structure(c(1487311200, 1487570400, 1487656800, 
      1487743200, 1487829600), tzone = "CST6CDT", tclass = c("POSIXct", 
      "POSIXt")), .Dim = c(5L, 1L), .Dimnames = list(NULL, "BRL.LOW.1")), 
      structure(c(1, 0, 0, 0, 0), .indexCLASS = c("POSIXct", "POSIXt"
      ), .indexTZ = "", tclass = c("POSIXct", "POSIXt"), tzone = "CST6CDT", class = c("xts", 
      "zoo"), index = structure(c(1487311200, 1487570400, 1487656800, 
      1487743200, 1487829600), tzone = "CST6CDT", tclass = c("POSIXct", 
      "POSIXt")), .Dim = c(5L, 1L), .Dimnames = list(NULL, "CLP.LOW.1")), 
      structure(c(1, 0, 1, 0, -1), .indexCLASS = c("POSIXct", "POSIXt"
      ), .indexTZ = "", tclass = c("POSIXct", "POSIXt"), tzone = "CST6CDT", class = c("xts", 
      "zoo"), index = structure(c(1487311200, 1487570400, 1487656800, 
      1487743200, 1487829600), tzone = "CST6CDT", tclass = c("POSIXct", 
      "POSIXt")), .Dim = c(5L, 1L), .Dimnames = list(NULL, "COP.CLOSE")), 
      structure(c(1, -1, -1, -1, -1), .indexCLASS = c("POSIXct", 
      "POSIXt"), .indexTZ = "", tclass = c("POSIXct", "POSIXt"), tzone = "CST6CDT", class = c("xts", 
      "zoo"), index = structure(c(1487311200, 1487570400, 1487656800, 
      1487743200, 1487829600), tzone = "CST6CDT", tclass = c("POSIXct", 
      "POSIXt")), .Dim = c(5L, 1L), .Dimnames = list(NULL, "MXN.LOW.1")), 
      structure(c(1, -1, 0, -1, 0), .indexCLASS = c("POSIXct", 
      "POSIXt"), .indexTZ = "", tclass = c("POSIXct", "POSIXt"), tzone = "CST6CDT", class = c("xts", 
      "zoo"), index = structure(c(1487311200, 1487570400, 1487656800, 
      1487743200, 1487829600), tzone = "CST6CDT", tclass = c("POSIXct", 
      "POSIXt")), .Dim = c(5L, 1L), .Dimnames = list(NULL, "PEN.HIGH.1")), 
      structure(c(1, 1, 1, 0, -1), .indexCLASS = c("POSIXct", "POSIXt"
      ), .indexTZ = "", tclass = c("POSIXct", "POSIXt"), tzone = "CST6CDT", class = c("xts", 
      "zoo"), index = structure(c(1487311200, 1487570400, 1487656800, 
      1487743200, 1487829600), tzone = "CST6CDT", tclass = c("POSIXct", 
      "POSIXt")), .Dim = c(5L, 1L), .Dimnames = list(NULL, "CNY.CLOSE")), 
      structure(c(0, 1, 1, 0, 0), .indexCLASS = c("POSIXct", "POSIXt"
      ), .indexTZ = "", tclass = c("POSIXct", "POSIXt"), tzone = "CST6CDT", class = c("xts", 
      "zoo"), index = structure(c(1487311200, 1487570400, 1487656800, 
      1487743200, 1487829600), tzone = "CST6CDT", tclass = c("POSIXct", 
      "POSIXt")), .Dim = c(5L, 1L), .Dimnames = list(NULL, "IDR.LOW.1")), 
      structure(c(1, 1, 1, 1, 1), .indexCLASS = c("POSIXct", "POSIXt"
      ), .indexTZ = "", tclass = c("POSIXct", "POSIXt"), tzone = "CST6CDT", class = c("xts", 
      "zoo"), index = structure(c(1487138400, 1487224800, 1487311200, 
      1487570400, 1487743200), tzone = "CST6CDT", tclass = c("POSIXct", 
      "POSIXt")), .Dim = c(5L, 1L), .Dimnames = list(NULL, "INR.LOW.1")), 
      structure(c(-1, -1, -1, -1, -1), .indexCLASS = c("POSIXct", 
      "POSIXt"), .indexTZ = "", tclass = c("POSIXct", "POSIXt"), tzone = "CST6CDT", class = c("xts", 
      "zoo"), index = structure(c(1487311200, 1487570400, 1487656800, 
      1487743200, 1487829600), tzone = "CST6CDT", tclass = c("POSIXct", 
      "POSIXt")), .Dim = c(5L, 1L), .Dimnames = list(NULL, "KRW.LOW.1")))
  </code></pre>