Displaying 1 result from an estimated 1 matches for "lookzones".
Did you mean:
lookzone
2012 Oct 18
3
For loop with i and j and multiple if statements... help!
...ordinates. This give the following results:
Look zone 1 = x > 170, x < 1250, y > 150 and y < 480
look sone 2 = x > 170, x < 420, y > 480 and y < 810.
Now I would like to assign a lookzone for each subject by the means of a
function with a for loop.
I've made this:
lookzones <- function(input){
lookzone <- matrix(0, nrow(input), 1)#Make space for
lookzone variables
for(i in 1:nrow(input)){
for(j in 1:nrow(input)){
if (x[i] > 170 && x[i] < 12...