Write a function that accepts a vector of integers (for simplicity, you don’t have to worry about input checking) and returns a logical vector that is TRUE whenever the input is even, FALSE whenever...


Write a function that accepts a vector of integers (for simplicity, you don’t have to


worry about input checking) and returns a logical vector that is TRUE whenever the


input is even, FALSE whenever the input is odd, and NA whenever the input is non‐


finite (nonfinite means anything that will make is.finite return FALSE: Inf, -Inf,


NA, and NaN). Check that the function works with positive, negative, zero, and non‐


finite inputs. [10]



May 26, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here