At lines 128-129 in otherfunctions.R, in the basewin function, there's loop that runs through each cohort to handle the spatial replication. I'm troubleshooting my use of slidingwin and am reading through this part of code. My question is about these lines:
#Take a subset of the data for that cohort...
sub <- subset(data, cohort = i)
I get an error when I run this loop in isolation as is. Should this be a logical expression (cohort==i) so that the dataset is subset to current cohort in the loop? Thanks!
At lines 128-129 in otherfunctions.R, in the
basewinfunction, there's loop that runs through each cohort to handle the spatial replication. I'm troubleshooting my use ofslidingwinand am reading through this part of code. My question is about these lines:I get an error when I run this loop in isolation as is. Should this be a logical expression (
cohort==i) so that the dataset is subset to current cohort in the loop? Thanks!