DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR R
how to use ifelse in r
> a = c(5,7,2,9) > ifelse(a %% 2 == 0,"even","odd") [1] "odd" "odd" "even" "odd"
Source by www.datamentor.io #
PREVIOUS
NEXT
Tagged:
#ifelse
ADD COMMENT
Topic
COMMENT
Name
5+4 =
Submit