Skip to content
Prev 389802 / 398506 Next

Please help me debugg

I am trying to run the following double loop which  I have written but it
is not running.
Unable to get my head around the mistake. Please try to spot the bug and
help
+ for(j in 1:68){
+ if(V(FriendGraph)$name[i]==names[j]){
+ gender_vector[i]<-sex[j]
+ break;}
+ else{gender_vector[i]<-NA}
+ } }

*Error in `[.data.frame`(sex, j) : undefined columns selectedCalled from:
`[.data.frame`(sex, j)*
Browse[1]>