Find the C-factor of a vote In this challenge you will be determining how controversial a vote is, given an array of other votes, by figuring out a number called the C-factor. What is the C-factor, you ask?
Well, imagine you've got multiple votes on an election. We'll use 1 and 0 for the sake of the challenge to represent two different candidates in an election. Here's the ten votes in our sample election:
0110111011

Now, say we want to find the C-factor of any vote for candidate 0. We can do that with the following function:
$$
f(o,v) = abs(o-mean(v))
$$
In \$f\$, o is the vote we want to determine the C-factor for, and v is an array of votes. So, using our function, to get the C-factor of any vote for candidate 0:
$$
f(0, [0,1,1,0,1,1,1,0,1,1]) = 0.7
$$
A lower C-factor shows that the vote was less controversial in comparison to the other votes. So, a vote for candidate 0 is more different from the other votes than a vote for candidate 1. In comparison, the C-factor for a candidate 1 vote is \$0.3\$, so it is less controversial because it is more like the other votes.
The Challenge
Write a function \$f(o,v)\$ to determine the C-factor of a vote o given results of a vote v.

o must be an integer, either 0 or 1.

v must be an array (or similar container type depending on language specifications) of arbitrary length containing zeroes and ones.

The function should return or print to the console the resulting C-factor given the function parameters, using the formula above or a modified method.


Good luck! The least bytes wins (winner chosen in five days).
R, 23 bytes



function(o,v)mean(o!=v)


Try it online!

The challenge boils down to computing the proportion of values in v different from o (i.e. mean(xor(o,v))). We can therefore avoid using abs.