Displaying 1 result from an estimated 1 matches for "dist_flag".
Did you mean:
list_flag
2012 Aug 24
3
ifelse problem - bug or operator error
Hi R-Helpers,
I don't think I need to post a dataset for this question but if I do, I
can. Anyway, I am having a lot of trouble with the ifelse command.
Here is my code:
vn$PM.DIST_flag <- ifelse( (vn$PM.EXP > 0.0) & (vn$PM.DIST.TOT != 1.0), 1,
0 )
And here is my output that doesn't make ANY sense:
PM.EXP PM.DIST.TOT PM.DIST_flag 0 0 0 0 0 0 0 0 0 177502 1 0 31403 1
0 0 0 0 1100549 1 0 38762 1 0 0 0 0 20025 1 0 0 0 0 13742 1 0 0 0 0
83078 1 0 0 0 0...