Question: Consider the following user - defined function: checkEvent = function ( data ) { unique _ numbers = unique ( data ) # collecting all

Consider the following user-defined function:
checkEvent = function(data){
unique_numbers = unique(data) # collecting all the unique values
for (val in unique_numbers){
if (val%%2==0){
return(0)
}
}
return (1)
}
This function returns TRUE if the input vector 'data' has:
Question 1 options:
At least one element odd
At least one element even
All elements even
All elements odd

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!