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

onsider the following user-defined function:
checkEvent = function(data){
unique_numbers = unique(data) # collecting all the unique values
for (val in unique_numbers){
if (sum(val == data)!=10){
return(0)
}
}
return (1)
}
This function returns TRUE if the input vector 'data' has:
Question 2 options:
None of the values equal to 10
At least one value not equal to 10
All unique values appear exactly 10 times each
Sum of unique values not equal to 10

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!