Skip to content
Prev 171025 / 398503 Next

Use of ifelse for indicating specific rownumber

I think you are looking for something like:

ifelse(1:nrow(b2) %in% i, 1, 0)


Patrick Burns
patrick at burns-stat.com
+44 (0)20 8525 0696
http://www.burns-stat.com
(home of "The R Inferno" and "A Guide for the Unwilling S User")
joe1985 wrote: