[R] Please help me debugg
Shrinivas Dharma
dh@rm@ @end|ng |rom metr|cuk@com
Fri Nov 5 07:59:21 CET 2021
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(i in 1:122){
+ 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]>
--
Warm Regards,
*Shrinivas Dharmadhikari*
Metric Consultancy Ltd.
91, Florida Estate,
Keshavanagar, Mundhwa
Pune-411036.
M: +91 98 230 09850
E : dharma using metricuk.com
www.metricglobal.com
*P* Please consider the environment and do not print this email unless
absolutely necessary.
[[alternative HTML version deleted]]
More information about the R-help
mailing list