Skip to content
Prev 169983 / 398506 Next

ifelse()

On Tue, Feb 10, 2009 at 01:44:17PM -0800, kayj wrote:
ifelse evaluates the condition given in its first argument and returns
the value of the second argument for all cases found to be TRUE and
the value of the third argument otherwise. As the first 4 elments of X
fulfill your condition (X>0) the corresponding result for them is 1 and
the rest 0.

See ?ifelse for details.

cu
	Philipp