HBClab / NetworkNeuroscience

Repository for scripts to run network analyses on neuroimaging data
GNU General Public License v3.0
0 stars 0 forks source link

Subject offset on the counters #6

Open mattsodoma opened 2 years ago

mattsodoma commented 2 years ago

Looks like your subject offset is from counters not being reset between loops. Its possible that grepl is not returning something when there is no match so it isn't resetting a match_a1 value. It seems to work fine as long as you reset these within the loop. I dont know if list is the optimal structure, but seems to work. The issue now, is that you need a contingency in place for when match_a1, a2, or a3 are not found as it errors out on subject 2117. You'll want something with the inverse logic of this, something like if match_a1 does not exist, next, else the code you have. Screen Shot 2021-10-06 at 1 52 16 PM Screen Shot 2021-10-06 at 1 49 38 PM