c_proportion_logical function

c_function for proportion of TRUE in logical vector