Given a vector of numeric values. with a R function using loop.
testdouble(data). that returns TRUE if all the even indexs elements
of the vector are twice their preceding value, other wise your
function returns FALSE. You can assume that the given vector has an
even number of values.
TRUE scenarios:
c(3, 6, 5, 10, 11, 22, 13, 26)
c(0, 0,1, 2, 2, 4, 3, 6)
FALSE scenarios:
c(3, 7, 5, 6, 11, 22, 13, 26)
c(0, 2, 1, 2,...