In the following example, how can i.want.them.all
get all the 10 numbers from 5 to 14?
control.me <- 0 # or 1
a.lot.of.elements <- c(5:14)
i.want.them.all <- ifelse(control.me == 1, a.lot.of.elements, a.lot.of.elements - 10)
print(i.want.them.all)
[1] 5
Is there a construct that works like this? :
a.lot.of.elements <- c(5:14)
i.want.them.now <- magic.construct(control.me == 1, a.lot.of.elements, a.lot.of.elements - 10)
print(i.want.them.now)
[1] 5 6 7 8 9 10 11 12 13 14
If not, how could I accomplish what I want to do?