Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR R

for R

x <- c(2,5,3,9,8,11,6)
count <- 0
for (val in x) {
	if(val %% 2 == 0) {
    	count = count+1
	}
}

Source by www.datamentor.io #
 
PREVIOUS NEXT
Tagged: #R
ADD COMMENT
Topic
Name
1+8 =