Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

if else functionr

#example if else to convert 0's and 1's to males and females respectively
#vector contains 0s and 1s
vector <- ifelse(vector==0,"Male","Female")
Source by www.codecademy.com #
 
PREVIOUS NEXT
Tagged: #functionr
ADD COMMENT
Topic
Name
3+5 =