Skip to content
Prev 333401 / 398506 Next

if else in R

On Nov 19, 2013, at 5:30 PM, Gary Dong wrote:

            
Consider this alternative:

 ab$c <- (ab  >0 ) * ab$a/ab$b

Although in general, you will probably use `ifelse`.

?ifelse   # different than ?"if"